ergo
|
Smart pointer class to control access to object. More...
#include <ValidPtr.h>
Public Member Functions | |
ValidPtr (Tobj *p) | |
Copy ordinary pointer constructor. | |
~ValidPtr () | |
Tobj & | operator* () const |
Tobj * | operator-> () const |
const Tobj & | getConstRefForCopying () const |
getConstRefForCopying() is provided to make it possible to copy the object also when it is written to file. | |
void | inMemorySet (bool val) |
bool | inMemoryGet () const |
void | haveDataStructureSet (bool val) |
bool | haveDataStructureGet () const |
Static Public Member Functions | |
static void | swap (ValidPtr< Tobj > &ptrA, ValidPtr< Tobj > &ptrB) |
Protected Attributes | |
Tobj * | ptr |
bool | inMemory |
Access to ptr forbidden if inMemory is false. | |
bool | haveDataStructure |
Access to ptr forbidden if haveDataStructure is false. | |
Private Member Functions | |
ValidPtr (ValidPtr< Tobj > const &) | |
ValidPtr< Tobj > & | operator= (ValidPtr< Tobj > const &) |
Smart pointer class to control access to object.
Primary use: Control access to objects that may be written to file.
mat::ValidPtr::ValidPtr | ( | Tobj * | p | ) | [inline, explicit] |
Copy ordinary pointer constructor.
mat::ValidPtr::~ValidPtr | ( | ) | [inline] |
mat::ValidPtr::ValidPtr | ( | ValidPtr< Tobj > const & | ) | [inline, private] |
const Tobj& mat::ValidPtr::getConstRefForCopying | ( | ) | const [inline] |
getConstRefForCopying() is provided to make it possible to copy the object also when it is written to file.
Referenced by mat::MatrixBase< Treal, Tmatrix >::MatrixBase(), and mat::MatrixBase< Treal, Tmatrix >::operator=().
bool mat::ValidPtr::haveDataStructureGet | ( | ) | const [inline] |
void mat::ValidPtr::haveDataStructureSet | ( | bool | val | ) | [inline] |
Referenced by mat::MatrixBase< Treal, Tmatrix >::resetSizesAndBlocks(), mat::MatrixBase< Treal, Tmatrix >::MatrixBase(), mat::MatrixBase< Treal, Tmatrix >::operator=(), mat::MatrixTriangular< ergo_real, Matri >::inch(), mat::VectorGeneral< ergo_real, Vectorrr >::resetSizesAndBlocks(), mat::VectorGeneral< ergo_real, Vectorrr >::VectorGeneral(), and mat::VectorGeneral< ergo_real, Vectorrr >::operator=().
bool mat::ValidPtr::inMemoryGet | ( | ) | const [inline] |
void mat::ValidPtr::inMemorySet | ( | bool | val | ) | [inline] |
Tobj& mat::ValidPtr::operator* | ( | ) | const [inline] |
Tobj* mat::ValidPtr::operator-> | ( | ) | const [inline] |
static void mat::ValidPtr::swap | ( | ValidPtr< Tobj > & | ptrA, |
ValidPtr< Tobj > & | ptrB | ||
) | [inline, static] |
bool mat::ValidPtr::haveDataStructure [protected] |
Access to ptr forbidden if haveDataStructure is false.
Referenced by mat::ValidPtr< Tvector >::operator*(), mat::ValidPtr< Tvector >::operator->(), mat::ValidPtr< Tvector >::haveDataStructureSet(), and mat::ValidPtr< Tvector >::haveDataStructureGet().
bool mat::ValidPtr::inMemory [protected] |
Access to ptr forbidden if inMemory is false.
Referenced by mat::ValidPtr< Tvector >::operator*(), mat::ValidPtr< Tvector >::operator->(), mat::ValidPtr< Tvector >::inMemorySet(), and mat::ValidPtr< Tvector >::inMemoryGet().
Tobj* mat::ValidPtr::ptr [protected] |