Carna
Version 3.0.1
|
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. More... | |
Protected Member Functions | |
Association (AssociatedObjectType *associatedObject=nullptr) | |
Instantiates. | |
Related Functions | |
(Note that these are not member functions.) | |
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.
|
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 |
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.
Documentation generated by Doxygen