|
STK++ 1.0
|
Base class for all referencing containers. More...
#include <STK_IContainerRef.h>
Public Member Functions | |
| virtual | ~IContainerRef () |
| Virtual destructor. | |
| bool | isRef () const |
| is this own its own data ? | |
Protected Member Functions | |
| IContainerRef (bool ref) | |
| Default constructor We have to specify the member ref_. | |
| IContainerRef (const IContainerRef &T, bool ref) | |
| Copy constructor. | |
| void | setRef (bool ref) |
| Modify the container : can become a reference or the owner of the data. | |
Private Attributes | |
| bool | ref_ |
Is it a "true" container or a wrapper ? ref_ should be false if this own its own data, true otherwise. | |
Base class for all referencing containers.
The IContainerRef class is the base class for all containers that can be referenced. If a container is derived from this class, then this container can be a reference (a wrapper) on an other container. A container R is a reference of the container A, if it wrap the data contained in A. In this case, the boolean ref_ is true.
Definition at line 55 of file STK_IContainerRef.h.
| STK::IContainerRef::IContainerRef | ( | bool | ref | ) | [inline, protected] |
Default constructor We have to specify the member ref_.
| ref | : false if this own its own data. |
Definition at line 67 of file STK_IContainerRef.h.
: ref_(ref) { ;}
| STK::IContainerRef::IContainerRef | ( | const IContainerRef & | T, |
| bool | ref | ||
| ) | [inline, protected] |
Copy constructor.
| T | : The container to copy. |
| ref | : is this a wrapper of T ? |
Definition at line 74 of file STK_IContainerRef.h.
: ref_(ref) { ;}
| virtual STK::IContainerRef::~IContainerRef | ( | ) | [inline, virtual] |
| bool STK::IContainerRef::isRef | ( | ) | const [inline] |
is this own its own data ?
true if this is reference container, false otherwise Definition at line 84 of file STK_IContainerRef.h.
References ref_.
Referenced by STK::RecursiveArray1D< Integer, Array1D< Integer > >::clear(), STK::List1D< IVariable * >::clear(), STK::RecursiveArray1D< Integer, Array1D< Integer > >::erase(), STK::ArrayHo< Real >::erase(), STK::List1D< IVariable * >::erase(), STK::ArrayHo< TYPE >::erase(), STK::IArray2D< Integer, Array2D< Integer > >::eraseCols(), STK::IArray2D< Integer, Array2D< Integer > >::eraseRows(), STK::IArray1DBase< Range, Range, Array1D< Range > >::free1D(), STK::IArray2DBase< TYPE, TYPE *, ArrayHo< TYPE >, Array1D< TYPE >, Container2D >::freeHo(), STK::RecursiveArray1D< Integer, Array1D< Integer > >::freeMem(), STK::ArrayHo< Real >::freeMem(), STK::List1D< IVariable * >::freeMem(), STK::IArray2D< Integer, Array2D< Integer > >::freeMem(), STK::ArrayHo< TYPE >::freeMem(), STK::IArrayBase< TYPE * >::freePtrData(), STK::IArray2D< Integer, Array2D< Integer > >::insertCols(), STK::RecursiveArray1D< Integer, Array1D< Integer > >::insertElt(), STK::ArrayHo< Real >::insertElt(), STK::List1D< IVariable * >::insertElt(), STK::ArrayHo< TYPE >::insertElt(), STK::IArray2D< Integer, Array2D< Integer > >::insertRows(), STK::IArrayBase< TYPE * >::mallocPtrData(), STK::RecursiveArray1D< Integer, Array1D< Integer > >::popBack(), STK::ArrayHo< Real >::popBack(), STK::List1D< IVariable * >::popBack(), STK::ArrayHo< TYPE >::popBack(), STK::IArray2D< Integer, Array2D< Integer > >::popBackCols(), STK::IArray2D< Integer, Array2D< Integer > >::popBackRows(), STK::RecursiveArray1D< Integer, Array1D< Integer > >::pushBack(), STK::ArrayHo< Real >::pushBack(), STK::List1D< IVariable * >::pushBack(), STK::ArrayHo< TYPE >::pushBack(), STK::IArray2DBase< TYPE, TYPE *, ArrayHo< TYPE >, Array1D< TYPE >, Container2D >::pushBackByTransfer(), STK::IArray2D< Integer, Array2D< Integer > >::pushBackCols(), STK::IArray2D< Integer, Array2D< Integer > >::pushBackRows(), STK::IArrayBase< TYPE * >::reallocPtrData(), STK::IArray1DBase< Range, Range, Array1D< Range > >::reserve(), STK::List1D< IVariable * >::shift(), STK::IArray1DBase< Range, Range, Array1D< Range > >::shift(), STK::IArray2DBase< TYPE, TYPE *, ArrayHo< TYPE >, Array1D< TYPE >, Container2D >::shiftHo(), STK::IArrayBase< TYPE * >::shiftPtrData(), STK::IArray2D< Integer, Array2D< Integer > >::shiftVe(), STK::IArrayBase< TYPE * >::swap(), STK::ArrayHo< Real >::~ArrayHo(), STK::ArrayHo< TYPE >::~ArrayHo(), STK::IArray2D< Integer, Array2D< Integer > >::~IArray2D(), STK::IArrayBase< TYPE * >::~IArrayBase(), and STK::List1D< IVariable * >::~List1D().
{ return ref_;}
| void STK::IContainerRef::setRef | ( | bool | ref | ) | [inline, protected] |
Modify the container : can become a reference or the owner of the data.
To use with care if we want to avoid memory leak.
| ref | : false if this own its own data. |
Definition at line 91 of file STK_IContainerRef.h.
References ref_.
Referenced by STK::RecursiveArray1D< Integer, Array1D< Integer > >::initialize(), STK::ArrayHo< Real >::initialize(), STK::IArray2D< Integer, Array2D< Integer > >::initialize(), STK::ArrayHo< TYPE >::initialize(), STK::IArray2DBase< TYPE, TYPE *, ArrayHo< TYPE >, Array1D< TYPE >, Container2D >::pushBackByTransfer(), and STK::IArrayBase< TYPE * >::swap().
{ ref_ = ref;}
bool STK::IContainerRef::ref_ [private] |
Is it a "true" container or a wrapper ? ref_ should be false if this own its own data, true otherwise.
Definition at line 61 of file STK_IContainerRef.h.