API Guides > ConceptRT 3.x
OwningArrayPointer< T > Class Template Reference

Owning pointer for C-like array. More...

Detailed Description

template<typename T>
class ConceptRT::OwningArrayPointer< T >

Owning pointer for C-like array.

Object that contains a array of pointers. The objects array is owned by the OwningPointerArray therefore delete the OwningPointerArray will delete the owned objects array.

Template Parameters
TType of the pointer.
+ Inheritance diagram for OwningArrayPointer< T >:

Public Member Methods

 OwningArrayPointer ()
 Default constructor. More...
 
 OwningArrayPointer (OwningArrayPointer< T > &value)
 Default constructor. More...
 
 OwningArrayPointer (T *value)
 Default constructor. More...
 
virtual ~OwningArrayPointer ()
 Destructor. More...
 
OwningArrayPointer< T > & operator= (OwningArrayPointer< T > &value)
 Assignment operator. More...
 
OwningArrayPointer< T > & operator= (T *value)
 Assignment operator. More...
 
void Clear ()
 Clears the owned array object (delete[]) More...
 
T & operator[] (Int32 index)
 Array indexer operator. More...
 
const T & operator[] (Int32 index) const
 Array indexer operator. More...
 
- Public Member Methods inherited from BaseOwningPointer< T >
T * GetPointer () const
 Gets the owned object pointer. More...
 
T * DetachPointer ()
 Gets the owned object pointer and detach it from this owner. More...
 
T & operator* () const
 Indirection operator. More...
 
T * operator-> () const
 Gets the owned object pointer. More...
 
bool operator== (T *right) const
 Equality operator. More...
 
bool operator!= (T *right) const
 Not Equality operator. More...
 

Additional Inherited Members

- Public Attributes inherited from BaseOwningPointer< T >
T * __internalTarget
 The internal target More...
 

Constructor & Destructor Documentation

Default constructor.

Default constructor.

Parameters
value[in,out] The value.
OwningArrayPointer ( T *  value)

Default constructor.

Parameters
value[in,out] The array object to own.
~OwningArrayPointer ( )
virtual

Destructor.

Warning
Non-Deterministic: May delete the array object if not null. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.

Methods Documentation

void Clear ( )

Clears the owned array object (delete[])

Warning
Non-Deterministic: May delete the array object if not null. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
OwningArrayPointer< T > & operator= ( OwningArrayPointer< T > &  value)

Assignment operator.

Parameters
value[in,out] The value.
Returns
A shallow copy of this object.
OwningArrayPointer< T > & operator= ( T *  value)

Assignment operator.

Parameters
value[in,out] The array object to own.
Returns
A shallow copy of this object.
T & operator[] ( Int32  index)

Array indexer operator.

Parameters
indexZero-based index of the object.
Returns
The indexed object.
Warning
Be careful there is no ckeck of bound on C-like array access.
const T & operator[] ( Int32  index) const

Array indexer operator.

Parameters
indexZero-based index of the object.
Returns
The indexed object.
Warning
Be careful there is no ckeck of bound on C-like array access.