Nymph
v1.5.2
Flow-Based Data Processing Framework
|
Go to the source code of this file.
Macros | |
#define | MEMBERVARIABLE_NOSET(TYPE, NAME) |
#define | MEMBERVARIABLE(TYPE, NAME) |
#define | MEMBERVARIABLE_PROTECTED_NOSET(TYPE, NAME) |
#define | MEMBERVARIABLE_PROTECTED(TYPE, NAME) |
#define | MEMBERVARIABLEREF_NOSET(TYPE, NAME) |
#define | MEMBERVARIABLEREF(TYPE, NAME) |
#define | MEMBERVARIABLEREF_PROTECTED_NOSET(TYPE, NAME) |
#define | MEMBERVARIABLEREF_PROTECTED(TYPE, NAME) |
#define MEMBERVARIABLE | ( | TYPE, | |
NAME | |||
) |
Definition at line 40 of file KTMemberVariable.hh.
#define MEMBERVARIABLE_NOSET | ( | TYPE, | |
NAME | |||
) |
Creates a member variable with type TYPE name f[NAME], plus getter and setter. MEMBERVARIABLE_NOSET will provide the variable and getter, but no setter, allowing you to provide a custom setter.
Usage example, in a class header file: MEMBERVARIABLE(double, MyVar)
You still need to initialize the variables in the class constructors.
The generated code is: private: TYPE f[NAME]; public: inline TYPE Get[NAME]() const { return f[NAME]; } inline void Set[NAME](TYPE var) { f[NAME] = var; }
Definition at line 34 of file KTMemberVariable.hh.
#define MEMBERVARIABLE_PROTECTED | ( | TYPE, | |
NAME | |||
) |
Definition at line 50 of file KTMemberVariable.hh.
#define MEMBERVARIABLE_PROTECTED_NOSET | ( | TYPE, | |
NAME | |||
) |
Definition at line 44 of file KTMemberVariable.hh.
#define MEMBERVARIABLEREF | ( | TYPE, | |
NAME | |||
) |
Definition at line 85 of file KTMemberVariable.hh.
#define MEMBERVARIABLEREF_NOSET | ( | TYPE, | |
NAME | |||
) |
Creates a member variable with type TYPE name f[NAME], plus getters and setters. MEMBERVARIABLEREF_NOSET will provide the variable and getter, but no setter, allowing you to provide a custom setter.
Usage example, in a class header file: MEMBERVARIABLEREF(std::string, MyVar)
You still need to initialize the variables in the class constructors.
The generated code is: private: TYPE f[NAME]; public: inline const TYPE& Get[NAME]() const { return f[NAME]; } inline void Set[NAME](const TYPE& var) { f[NAME] = var; }
Definition at line 78 of file KTMemberVariable.hh.
#define MEMBERVARIABLEREF_PROTECTED | ( | TYPE, | |
NAME | |||
) |
Definition at line 96 of file KTMemberVariable.hh.
#define MEMBERVARIABLEREF_PROTECTED_NOSET | ( | TYPE, | |
NAME | |||
) |
Definition at line 89 of file KTMemberVariable.hh.