ergo
mat::ValidPtr Class Reference

Smart pointer class to control access to object. More...

#include <ValidPtr.h>

List of all members.

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 &)

Detailed Description

Smart pointer class to control access to object.

Primary use: Control access to objects that may be written to file.


Constructor & Destructor Documentation

mat::ValidPtr::ValidPtr ( Tobj *  p) [inline, explicit]

Copy ordinary pointer constructor.

mat::ValidPtr::~ValidPtr ( ) [inline]
mat::ValidPtr::ValidPtr ( ValidPtr< Tobj > const &  ) [inline, private]

Member Function Documentation

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::inMemoryGet ( ) const [inline]
Tobj& mat::ValidPtr::operator* ( ) const [inline]
Tobj* mat::ValidPtr::operator-> ( ) const [inline]
ValidPtr<Tobj>& mat::ValidPtr::operator= ( ValidPtr< Tobj > const &  ) [inline, private]
static void mat::ValidPtr::swap ( ValidPtr< Tobj > &  ptrA,
ValidPtr< Tobj > &  ptrB 
) [inline, static]

Member Data Documentation


The documentation for this class was generated from the following file: