ug4
|
Go to the source code of this file.
Macros | |
#define | ADD_CONSTRUCTOR(__theSignature) template add_constructor<void (*) __theSignature > |
for adding of constructors with signatures. More... | |
#define | OVERLOADED_CONST_METHOD_PTR(returnType, classType, methodName, arguments) static_cast<returnType (classType::*)arguments const>(&classType::methodName) |
#define | OVERLOADED_FUNCTION_PTR(returnType, methodName, arguments) static_cast<returnType (*)arguments >(&methodName) |
#define | OVERLOADED_METHOD_PTR(returnType, classType, methodName, arguments) static_cast<returnType (classType::*)arguments>(&classType::methodName) |
#define ADD_CONSTRUCTOR | ( | __theSignature | ) | template add_constructor<void (*) __theSignature > |
for adding of constructors with signatures.
example:
note the double brackets ! ADD_CONSTRUCTOR ( (int a, int b) )
#define OVERLOADED_CONST_METHOD_PTR | ( | returnType, | |
classType, | |||
methodName, | |||
arguments | |||
) | static_cast<returnType (classType::*)arguments const>(&classType::methodName) |
for a member function with signature bool MyClass::my_member_fu(double d) const : OVERLOADED_CONST_METHOD_PTR(bool, MyClass, my_member_fu, (double d) )
#define OVERLOADED_FUNCTION_PTR | ( | returnType, | |
methodName, | |||
arguments | |||
) | static_cast<returnType (*)arguments >(&methodName) |
for a function with signature int *MyFunction(char *name, OtherType &t) : OVERLOADED_FUNCTION_PTR(int *, MyFunction, (char *name, OtherType &t ) )
#define OVERLOADED_METHOD_PTR | ( | returnType, | |
classType, | |||
methodName, | |||
arguments | |||
) | static_cast<returnType (classType::*)arguments>(&classType::methodName) |
for a member function with signature void MyClass::my_member_fu() : OVERLOADED_METHOD_PTR(void, MyClass, my_member_fu, () )