![]() |
CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
|
Immutable object wrapper. More...
Public Member Functions | |
| Guard () | |
| Default constructor. | |
| ~Guard () | |
| Destructor. | |
| Guard (const Guard< T_Object > &other) | |
| Copy constructor. | |
| Guard< T_Object > & | operator= (const Guard< T_Object > &other) |
| Copy assignment operator. | |
| template<typename U_Object> | |
| Guard (Guard< U_Object > &&other) | |
| Move converting constructor. | |
| Guard (const T_Object &obj) | |
| Object constructor. | |
| void | clear () |
| Clears the guard. | |
| const T_Object & | get () const |
| Retrieves the guarded object. | |
Immutable object wrapper.
| T_Object | The object type to guard. |
Provides a read-only view of an object, preventing modifications to its contents. Used when functions need to return objects with immutable data that must be protected from external changes.
|
inline |
Default constructor.
Constructs an empty guard with no attached object.
|
inline |
Destructor.
Detaches the guarded object and destroys the guard.
|
inline |
Copy constructor.
Constructs a guard with a referenced copy of other.
|
inline |
Move converting constructor.
| U_Object | The source object type. |
Constructs a guard by converting and moving from other.
|
inlineexplicit |
Object constructor.
Constructs a guard with a referenced copy of obj.
| [in] | obj | The object to guard. |
|
inline |
Copy assignment operator.
Replaces the guarded object with a referenced copy of other.
|
inline |
Clears the guard.
Detaches the guarded object and resets the guard to an empty state.
|
inline |
Retrieves the guarded object.
Returns a constant reference to the object being guarded.