15#ifndef ASSOCIATION_H_6014714286
16#define ASSOCIATION_H_6014714286
46template<
typename AssociatedObjectType >
66 return associatedObject;
89 return this->
get() !=
nullptr;
100 associatedObject = 0;
109 : associatedObject( associatedObject )
132template<
typename AssociatedObjectType >
Contains forward-declarations.
Represents an association.
AssociatedObjectType * operator->() const
virtual ~Association()
Does nothing.
AssociatedObjectType & operator*() const
Returns raw reference to the referenced object.
Association(AssociatedObjectType *associatedObject=nullptr)
Instantiates.
void forget()
Makes this association forget it's referenced object.
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.
AssociatedObjectType * get() const
Returns raw pointer to the referenced object.
Defines LibCarna::base::noncopyable and NON_COPYABLE.
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.