![]() |
VR-Forces Developer's Guide
|
Go to the source code of this file.
Namespaces | |
| makVrf | |
Macros | |
| #define | DEFINE_REF_ACCESSORS(ReturnType, Method, Member) |
| #define | DEFINE_MUTATOR(Type, Mutator) void set##Mutator(const Type& v) { my##Mutator = v; }; |
| #define | DEFINE_MUTATOR_PROTOTYPE(Type, Mutator) void set##Mutator(const Type& v); |
| #define | DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator) |
| #define | DEFINE_ACCESSOR_MUTATOR_PROTOTYPE(ReturnType, Accessor, Mutator) |
| #define | UNDEFINED_RETURNVALUE_ACCESSOR(ReturnType, Member) virtual const ReturnType Member() const { throw DtUnimplementedMethod("The const " #Member " const method is unimplemented"); }; |
| #define | UNDEFINED_RETURNREF_ACCESSOR(ReturnType, Member) virtual const ReturnType& Member() const { throw DtUnimplementedMethod("The const &" #Member " const method is unimplemented"); }; |
| #define | UNDEFINED_RETURNREF_CONST_ACCESSOR(ReturnType, Member) virtual const ReturnType& Member() const { throw DtUnimplementedMethod("The const &" #Member " const method is unimplemented"); }; |
| #define | UNDEFINED_RETURNREF_ACCESSORS(ReturnType, Member) |
| #define | UNDEFINED_MUTATOR(Type, Set) virtual void set##Set(const Type& v) { throw DtUnimplementedMethod("The set" #Set " method is unimplemented"); }; |
| #define | UNDEFINED_MUTATOR_WITH_ARGS(Set,...) virtual void set##Set(__VA_ARGS__) { throw DtUnimplementedMethod("The set" #Set " method is unimplemented"); }; |
| #define | UNDEFINED_MUTATOR_METHOD(Set,...) virtual void set##Set(__VA_ARGS__) { throw DtUnimplementedMethod("The set" #Set " method is unimplemented"); }; |
| #define | UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set) |
| #define | UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set) |
| #define | UNDEFINED_RETURNREF_ACCESSORS_MUTATOR(Type, Member, Set) |
| #define | UNDEFINED_CONST_METHOD(Type, Method,...) virtual Type Method(__VA_ARGS__) const { throw DtUnimplementedMethod("The const " #Method " const method is unimplemented"); }; |
| #define | UNDEFINED_METHOD(Type, Method,...) virtual Type Method(__VA_ARGS__) { throw DtUnimplementedMethod("The " #Method " method is unimplemented"); }; |
| #define DEFINE_REF_ACCESSORS | ( | ReturnType, | |
| Method, | |||
| Member | |||
| ) |
Defines const and non-const reference accessors for a member variable.
| ReturnType | The return type of the accessor. |
| Method | The accessor method name. |
| Member | The member variable name (without the "my" prefix). |
| #define DEFINE_MUTATOR | ( | Type, | |
| Mutator | |||
| ) | void set##Mutator(const Type& v) { my##Mutator = v; }; |
Defines an inline setter method that assigns a value to a member variable.
| Type | The parameter type of the setter. |
| Mutator | The setter name suffix (appended to "set") and member variable name (without the "my" prefix). |
| #define DEFINE_MUTATOR_PROTOTYPE | ( | Type, | |
| Mutator | |||
| ) | void set##Mutator(const Type& v); |
Declares a setter method prototype without providing an inline implementation.
| Type | The parameter type of the setter. |
| Mutator | The setter name suffix (appended to "set"). |
| #define DEFINE_ACCESSOR_MUTATOR | ( | ReturnType, | |
| Accessor, | |||
| Mutator | |||
| ) |
Defines a const reference accessor and an inline setter for a member variable.
| ReturnType | The return type of the accessor. |
| Accessor | The accessor method name. |
| Mutator | The setter name suffix (appended to "set") and member variable name (without the "my" prefix). |
| #define DEFINE_ACCESSOR_MUTATOR_PROTOTYPE | ( | ReturnType, | |
| Accessor, | |||
| Mutator | |||
| ) |
Declares prototypes for a const accessor and a setter without inline implementations.
| ReturnType | The return type of the accessor. |
| Accessor | The accessor method name. |
| Mutator | The setter name suffix (appended to "set"). |
| #define UNDEFINED_RETURNVALUE_ACCESSOR | ( | ReturnType, | |
| Member | |||
| ) | virtual const ReturnType Member() const { throw DtUnimplementedMethod("The const " #Member " const method is unimplemented"); }; |
Defines a virtual const accessor that throws DtUnimplementedMethod, marking the method as requiring an override in a derived class. Returns by value.
| ReturnType | The return type of the accessor. |
| Member | The accessor method name. |
| #define UNDEFINED_RETURNREF_ACCESSOR | ( | ReturnType, | |
| Member | |||
| ) | virtual const ReturnType& Member() const { throw DtUnimplementedMethod("The const &" #Member " const method is unimplemented"); }; |
Defines a virtual const reference accessor that throws DtUnimplementedMethod, marking the method as requiring an override in a derived class.
| ReturnType | The return type of the accessor. |
| Member | The accessor method name. |
| #define UNDEFINED_RETURNREF_CONST_ACCESSOR | ( | ReturnType, | |
| Member | |||
| ) | virtual const ReturnType& Member() const { throw DtUnimplementedMethod("The const &" #Member " const method is unimplemented"); }; |
Defines a virtual const reference accessor that throws DtUnimplementedMethod. Equivalent to UNDEFINED_RETURNREF_ACCESSOR; provided for naming clarity in contexts where const-ness is explicit.
| ReturnType | The return type of the accessor. |
| Member | The accessor method name. |
| #define UNDEFINED_RETURNREF_ACCESSORS | ( | ReturnType, | |
| Member | |||
| ) |
Defines both const and non-const virtual reference accessors that throw DtUnimplementedMethod, requiring overrides in a derived class.
| ReturnType | The return type of the accessors. |
| Member | The accessor method name. |
| #define UNDEFINED_MUTATOR | ( | Type, | |
| Set | |||
| ) | virtual void set##Set(const Type& v) { throw DtUnimplementedMethod("The set" #Set " method is unimplemented"); }; |
Defines a virtual setter that throws DtUnimplementedMethod, requiring an override in a derived class.
| Type | The parameter type of the setter. |
| Set | The setter name suffix (appended to "set"). |
| #define UNDEFINED_MUTATOR_WITH_ARGS | ( | Set, | |
| ... | |||
| ) | virtual void set##Set(__VA_ARGS__) { throw DtUnimplementedMethod("The set" #Set " method is unimplemented"); }; |
Defines a virtual setter accepting variadic arguments that throws DtUnimplementedMethod, requiring an override in a derived class.
| Set | The setter name suffix (appended to "set"). |
| ... | The parameter list for the setter method. |
| #define UNDEFINED_MUTATOR_METHOD | ( | Set, | |
| ... | |||
| ) | virtual void set##Set(__VA_ARGS__) { throw DtUnimplementedMethod("The set" #Set " method is unimplemented"); }; |
Defines a virtual setter method accepting variadic arguments that throws DtUnimplementedMethod. Functionally identical to UNDEFINED_MUTATOR_WITH_ARGS; provided as an alternative naming convention.
| Set | The setter name suffix (appended to "set"). |
| ... | The parameter list for the setter method. |
| #define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR | ( | Type, | |
| Member, | |||
| Set | |||
| ) |
Defines an undefined virtual by-value accessor and an undefined virtual setter, both throwing DtUnimplementedMethod and requiring overrides in a derived class.
| Type | The accessor return type and setter parameter type. |
| Member | The accessor method name. |
| Set | The setter name suffix (appended to "set"). |
| #define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR | ( | Type, | |
| Member, | |||
| Set | |||
| ) |
Defines an undefined virtual const-reference accessor and an undefined virtual setter, both throwing DtUnimplementedMethod and requiring overrides in a derived class.
| Type | The accessor return type and setter parameter type. |
| Member | The accessor method name. |
| Set | The setter name suffix (appended to "set"). |
| #define UNDEFINED_RETURNREF_ACCESSORS_MUTATOR | ( | Type, | |
| Member, | |||
| Set | |||
| ) |
Defines undefined virtual const and non-const reference accessors and an undefined virtual setter, all throwing DtUnimplementedMethod and requiring overrides in a derived class.
| Type | The accessor return type and setter parameter type. |
| Member | The accessor method name. |
| Set | The setter name suffix (appended to "set"). |
| #define UNDEFINED_CONST_METHOD | ( | Type, | |
| Method, | |||
| ... | |||
| ) | virtual Type Method(__VA_ARGS__) const { throw DtUnimplementedMethod("The const " #Method " const method is unimplemented"); }; |
Defines a virtual const method with variadic parameters that throws DtUnimplementedMethod, requiring an override in a derived class.
| Type | The return type of the method. |
| Method | The method name. |
| ... | The parameter list for the method. |
| #define UNDEFINED_METHOD | ( | Type, | |
| Method, | |||
| ... | |||
| ) | virtual Type Method(__VA_ARGS__) { throw DtUnimplementedMethod("The " #Method " method is unimplemented"); }; |
Defines a virtual non-const method with variadic parameters that throws DtUnimplementedMethod, requiring an override in a derived class.
| Type | The return type of the method. |
| Method | The method name. |
| ... | The parameter list for the method. |