![]() |
LibCarna Version 3.4.0
|
Represents an association. More...
#include <Association.hpp>
Public Member Functions | |
virtual | ~Association () |
Does nothing. | |
AssociatedObjectType * | get () const |
Returns raw pointer to the referenced object. | |
AssociatedObjectType * | operator-> () const |
AssociatedObjectType & | operator* () const |
Returns raw reference to the referenced object. | |
operator bool () const | |
Tells whether any object is referenced by this association. | |
void | forget () |
Makes this association forget it's referenced object. | |
Protected Member Functions | |
Association (AssociatedObjectType *associatedObject=nullptr) | |
Instantiates. | |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename AssociatedObjectType > | |
bool | operator== (const LibCarna::base::Association< AssociatedObjectType > &l, const LibCarna::base::Association< AssociatedObjectType > &r) |
Tells whether l and r do reference the same object, that may be nullptr . | |
Represents an association.
By using this class it is possible to let the user of some software module decide whether he wants to pass the ownership of some object to that module or not.
Definition at line 47 of file Association.hpp.
|
inlinevirtual |
Does nothing.
Definition at line 57 of file Association.hpp.
|
inlineexplicitprotected |
Instantiates.
Definition at line 108 of file Association.hpp.
|
inline |
Makes this association forget it's referenced object.
Using this method it is possible to bypass the default behavior of the association when it is released.
Definition at line 98 of file Association.hpp.
|
inline |
Returns raw pointer to the referenced object.
Definition at line 64 of file Association.hpp.
|
inline |
Tells whether any object is referenced by this association.
Definition at line 87 of file Association.hpp.
|
inline |
Returns raw reference to the referenced object.
Definition at line 79 of file Association.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 71 of file Association.hpp.
|
related |
Tells whether l and r do reference the same object, that may be nullptr
.
Definition at line 133 of file Association.hpp.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen