MOOCHO (Single Doxygen Collection)
Version of the Day
|
For example, if you want to include a <<std aggr>="">> association with an object of type MyClass of the name my_object you would include the macro in the public section of YourClass declaration as follows: More...
Macros | |
#define | STANDARD_AGGREGATION_MEMBERS(TYPE, NAME) |
Insert class members for a non-const association. More... | |
#define | STANDARD_CONST_AGGREGATION_MEMBERS(TYPE, NAME) |
Insert class members for a constant association. More... | |
For example, if you want to include a <<std aggr>="">> association with an object of type MyClass of the name my_object you would include the macro in the public section of YourClass declaration as follows:
class YourClass { public: STANDARD_AGGREGATION_MEMBERS( MyClass, my_object ) };
Note that the macro addes the private member #TYPE* NAME_# to the class declaration and therefore the member NAME_ is available for direct access (in a constructor for example).
In order to have a const only association use:
class YourClass { public: STANDARD_CONST_AGGREGATION_MEMBERS( MyClass, my_object ) };
#define STANDARD_AGGREGATION_MEMBERS | ( | TYPE, | |
NAME | |||
) |
Insert class members for a non-const association.
Definition at line 77 of file StandardAggregationMacros.hpp.
#define STANDARD_CONST_AGGREGATION_MEMBERS | ( | TYPE, | |
NAME | |||
) |
Insert class members for a constant association.
Definition at line 100 of file StandardAggregationMacros.hpp.