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.
|
inlineexplicit |
Copy ordinary pointer constructor.
References haveDataStructure, inMemory, and ptr.
Referenced by operator=(), and swap().
|
inline |
References ptr.
|
inlineprivate |
|
inline |
getConstRefForCopying() is provided to make it possible to copy the object also when it is written to file.
References ptr.
Referenced by mat::MatrixBase< Treal, Tmatrix >::MatrixBase(), and mat::MatrixBase< Treal, Tmatrix >::operator=().
|
inline |
References haveDataStructure.
Referenced by mat::MatrixBase< Treal, Tmatrix >::MatrixBase(), mat::MatrixBase< Treal, Tmatrix >::operator=(), mat::VectorGeneral< Treal, typename Tmatrix::VectorType >::operator=(), swap(), and mat::VectorGeneral< Treal, typename Tmatrix::VectorType >::VectorGeneral().
|
inline |
References haveDataStructure.
|
inline |
References inMemory.
Referenced by mat::MatrixBase< Treal, Tmatrix >::MatrixBase(), mat::MatrixBase< Treal, Tmatrix >::operator=(), and swap().
|
inline |
References inMemory.
|
inline |
References haveDataStructure, inMemory, and ptr.
|
inline |
References haveDataStructure, inMemory, and ptr.
|
inlineprivate |
References ValidPtr().
|
inlinestatic |
References haveDataStructureGet(), inMemoryGet(), ptr, and ValidPtr().
Referenced by mat::MatrixSymmetric< real, matri >::transfer().
|
protected |
Access to ptr forbidden if haveDataStructure is false.
Referenced by haveDataStructureGet(), haveDataStructureSet(), operator*(), operator->(), and ValidPtr().
|
protected |
Access to ptr forbidden if inMemory is false.
Referenced by inMemoryGet(), inMemorySet(), operator*(), operator->(), and ValidPtr().
|
protected |
Referenced by getConstRefForCopying(), operator*(), operator->(), swap(), ValidPtr(), and ~ValidPtr().