3 #include "g_cont_vect_base.h"
4 #include "private/g_cont_vect_priv.h"
5 #include "g_cont_ref_custom.h"
15 template <
class T ,
class IT=it<T>,
class IT_C=it_const<T> >
class vect :
public vect_base<T,T,const T,IT,IT_C>
23 typedef IT_C ItConst_t;
26 vect (
AllocationPolicyAbstract* ap = AllocationPolicyAbstract::get_FromStandardPolicy() ,
int aAllocDeltaRBits = G_VECT_AL_DELTA_MASK_BITS ) : Base_t ( ap ,aAllocDeltaRBits ){}
27 vect (
const T* v,
int lbound ,
int ubound ,
AllocationPolicyAbstract* ap = AllocationPolicyAbstract::get_FromStandardPolicy() ,
int aAllocDeltaRBits = G_VECT_AL_DELTA_MASK_BITS):Base_t ( ap ,aAllocDeltaRBits ){ setContentFromVector (v,lbound,ubound); }
28 vect (
const T* v ,
size_t s ,
AllocationPolicyAbstract* ap = AllocationPolicyAbstract::get_FromStandardPolicy() ,
int aAllocDeltaRBits = G_VECT_AL_DELTA_MASK_BITS ) : Base_t ( ap ,aAllocDeltaRBits ){ setContentFromVector (v,s); }
29 vect (
const vect& o ,
AllocationPolicyAbstract* ap = AllocationPolicyAbstract::get_FromStandardPolicy() ,
int aAllocDeltaRBits = G_VECT_AL_DELTA_MASK_BITS ): Base_t ( ap ,aAllocDeltaRBits ) { this->mContent.replaceContent ( o.getLbound ( ) , o.getUbound ( ) , o.mContent.data ); }
33 vect& operator = (
const vect& other ) { setContent ( other );
return *
this; }
36 virtual void setContent (
const vect& other ){ this->mContent.replaceContent ( other.getLbound(), other.getUbound() , (
const T*)other ); }
38 void setContentFromVector (
const T* v ,
size_t size ) { setContentFromVector ( v , 0 , (
int)size-1 ); }
39 void setContentFromVector (
const T* v ,
int lbound ,
int ubound ) { this->mContent.replaceContent ( lbound , ubound , v ); }
41 operator const T* ( )
const {
return this->mContent.data; }
42 operator T* ( ) {
return this->mContent.data; }
48 Ref(
const Ref& other ){ G_VERBOSE_MSG_L5(
"vect::Ref::Ref(Ref& other )"); this->mRefTake(other); }
52 Vect_t& operator *() { G_VERBOSE_MSG_L5(
"T& vect::Ref::operator *()");
return *this->mGetObjP(); }
53 Vect_t* operator ->() { G_VERBOSE_MSG_L5(
"T& vect::Ref::operator ->()");
return this->mGetObjP(); }
54 const Vect_t& operator *()
const { G_VERBOSE_MSG_L5(
"const T& vect::Ref::operator *()");
return *this->mGetObjP(); }
55 const Vect_t* operator ->()
const { G_VERBOSE_MSG_L5(
"const T* vect::Ref::operator ->()");
return this->mGetObjP(); }
57 Ref& operator = (
const Ref& other ) { this->mRefTake(*
this);
return *
this; }
59 static Ref g_cont_new (
AllocationPolicyAbstract* aAllocPolicyP = AllocationPolicyAbstract::get_FromStandardPolicy ( ) ,
int aAllocDeltaRBits = G_VECT_AL_DELTA_MASK_BITS )
63 new ( result.mAllocateMemForObject(aAllocPolicyP) )
vect<T,IT,IT_C>(aAllocPolicyP,aAllocDeltaRBits);
Definition: g_cont_ref_base.h:37
Definition: g_cont_AllocationPolicyAbstract.h:16
Definition: g.mthread.ThreadSimpleEvent.h:5
Definition: g_cont_it_ref.h:11
Definition: g_cont_vect.h:15
Definition: g_cont_vect.h:44
Definition: g_cont_vect_base.h:14
Definition: g_cont_vect_priv.h:24
Definition: g_cont_vect_priv.h:237