Go to the documentation of this file.
49 template <
typename Tobj>
65 throw Failure(
"ValidPtr::operator*() const: "
66 "Attempt to access invalid object. "
67 "Object is on file.");
69 throw Failure(
"ValidPtr::operator*() const: "
70 "Attempt to access invalid object. "
71 "Do not have data structure.");
77 throw Failure(
"ValidPtr::operator->() const: "
78 "Attempt to access invalid pointer."
79 "Object is on file.");
81 throw Failure(
"ValidPtr::operator->() const: "
82 "Attempt to access invalid pointer. "
83 "Do not have data structure.");
111 throw "Swap called for objects not in memory";
113 throw "Swap called for objects without data structure";
114 Tobj * tmpPtr = ptrA.
ptr;
Smart pointer class to control access to object.
Definition: ValidPtr.h:50
Tobj & operator*() const
Definition: ValidPtr.h:63
void haveDataStructureSet(bool val)
Definition: ValidPtr.h:99
static void swap(ValidPtr< Tobj > &ptrA, ValidPtr< Tobj > &ptrB)
Definition: ValidPtr.h:106
bool inMemoryGet() const
Definition: ValidPtr.h:96
~ValidPtr()
Definition: ValidPtr.h:55
Definition: allocate.cc:39
void inMemorySet(bool val)
Definition: ValidPtr.h:93
ValidPtr(Tobj *p)
Copy ordinary pointer constructor.
Definition: ValidPtr.h:53
bool haveDataStructure
Access to ptr forbidden if haveDataStructure is false.
Definition: ValidPtr.h:123
Tobj * ptr
Definition: ValidPtr.h:119
ValidPtr< Tobj > & operator=(ValidPtr< Tobj > const &)
Definition: ValidPtr.h:126
Tobj * operator->() const
Definition: ValidPtr.h:75
const Tobj & getConstRefForCopying() const
getConstRefForCopying() is provided to make it possible to copy the object also when it is written to...
Definition: ValidPtr.h:89
bool inMemory
Access to ptr forbidden if inMemory is false.
Definition: ValidPtr.h:121
bool haveDataStructureGet() const
Definition: ValidPtr.h:102