47 template <
typename Tobj>
63 throw Failure(
"ValidPtr::operator*() const: " 64 "Attempt to access invalid object. " 65 "Object is on file.");
67 throw Failure(
"ValidPtr::operator*() const: " 68 "Attempt to access invalid object. " 69 "Do not have data structure.");
75 throw Failure(
"ValidPtr::operator->() const: " 76 "Attempt to access invalid pointer." 77 "Object is on file.");
79 throw Failure(
"ValidPtr::operator->() const: " 80 "Attempt to access invalid pointer. " 81 "Do not have data structure.");
109 throw "Swap called for objects not in memory";
111 throw "Swap called for objects without data structure";
112 Tobj * tmpPtr = ptrA.
ptr;
bool haveDataStructure
Access to ptr forbidden if haveDataStructure is false.
Definition: ValidPtr.h:121
ValidPtr< Tobj > & operator=(ValidPtr< Tobj > const &)
Definition: ValidPtr.h:124
bool inMemory
Access to ptr forbidden if inMemory is false.
Definition: ValidPtr.h:119
Definition: allocate.cc:30
~ValidPtr()
Definition: ValidPtr.h:53
static void swap(ValidPtr< Tobj > &ptrA, ValidPtr< Tobj > &ptrB)
Definition: ValidPtr.h:104
Tobj * operator->() const
Definition: ValidPtr.h:73
ValidPtr(Tobj *p)
Copy ordinary pointer constructor.
Definition: ValidPtr.h:51
const Tobj & getConstRefForCopying() const
getConstRefForCopying() is provided to make it possible to copy the object also when it is written to...
Definition: ValidPtr.h:87
Tobj * ptr
Definition: ValidPtr.h:117
bool inMemoryGet() const
Definition: ValidPtr.h:94
void haveDataStructureSet(bool val)
Definition: ValidPtr.h:97
bool haveDataStructureGet() const
Definition: ValidPtr.h:100
Tobj & operator*() const
Definition: ValidPtr.h:61
Smart pointer class to control access to object.
Definition: ValidPtr.h:48
void inMemorySet(bool val)
Definition: ValidPtr.h:91