![]() |
Carna Version 3.3.3
|
Represents an association. More...
#include <Association.h>
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 Carna::base::Association< AssociatedObjectType > &l, const Carna::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 44 of file Association.h.
|
inlinevirtual |
Does nothing.
Definition at line 54 of file Association.h.
|
inlineexplicitprotected |
Instantiates.
Definition at line 105 of file Association.h.
|
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 95 of file Association.h.
|
inline |
Returns raw pointer to the referenced object.
Definition at line 61 of file Association.h.
|
inline |
Tells whether any object is referenced by this association.
Definition at line 84 of file Association.h.
|
inline |
Returns raw reference to the referenced object.
Definition at line 76 of file Association.h.
|
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 68 of file Association.h.
|
related |
Tells whether l and r do reference the same object, that may be nullptr
.
Definition at line 130 of file Association.h.
Documentation generated by Doxygen