22 #ifndef TNT_I_REFVEC_H
23 #define TNT_I_REFVEC_H
28 #ifdef TNT_BOUNDS_CHECK
71 inline const T*
begin()
const;
75 void copy_(T* p,
const T* q,
const T* e);
76 void set_(T* p,
const T* b,
const T* e);
87 for (T* t=p; q<e; t++, q++)
103 std::cout <<
"new data storage.\n";
113 ref_count_(V.ref_count_)
157 if (ref_count_ !=
NULL)
160 if ((*ref_count_) == 0)
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_i_refvec.h:56
int is_null() const
Definition: tnt_i_refvec.h:202
void set_(T *p, const T *b, const T *e)
void copy_(T *p, const T *q, const T *e)
Definition: tnt_i_refvec.h:85
void destroy()
Definition: tnt_i_refvec.h:174
T * begin()
Definition: tnt_i_refvec.h:124
T * data_
Definition: tnt_i_refvec.h:60
i_refvec(const i_refvec &v)
int * ref_count_
Definition: tnt_i_refvec.h:61
T & operator[](int i)
Definition: tnt_i_refvec.h:136
i_refvec()
Definition: tnt_i_refvec.h:92
i_refvec< T > & operator=(const i_refvec< T > &V)
Definition: tnt_i_refvec.h:151
~i_refvec()
Definition: tnt_i_refvec.h:223
int ref_count() const
Definition: tnt_i_refvec.h:214
Definition: tnt_array1d.h:36
#define NULL
Definition: tnt_i_refvec.h:33