22 #ifndef TNT_I_REFVEC_H 23 #define TNT_I_REFVEC_H 28 #ifdef TNT_BOUNDS_CHECK 71 inline const T* begin()
const;
72 inline T& operator[](
int i);
73 inline const T& operator[](
int i)
const;
75 void copy_(T* p,
const T* q,
const T* e);
76 void set_(T* p,
const T* b,
const T* e);
77 inline int ref_count()
const;
78 inline int is_null()
const;
79 inline void destroy();
87 for (T* t=p; q<e; t++, q++)
103 std::cout <<
"new data storage.\n";
106 ref_count_ =
new int;
113 ref_count_(V.ref_count_)
115 if (V.ref_count_ != NULL)
157 if (ref_count_ != NULL)
160 if ((*ref_count_) == 0)
165 ref_count_ = V.ref_count_;
167 if (V.ref_count_ != NULL)
176 if (ref_count_ != NULL)
179 std::cout <<
"destorying data... \n";
184 std::cout <<
"deleted ref_count_ ...\n";
189 std::cout <<
"deleted data_[] ...\n";
204 return (data_ == NULL ? 1 : 0);
219 return (ref_count_ != NULL ? *ref_count_ : -1) ;
225 if (ref_count_ != NULL)
229 if (*ref_count_ == 0)
Definition: tnt_array1d.h:35
Definition: tnt_i_refvec.h:55