Develop Biology
The language of life
ClassMethodMacros.h File Reference
+ Include dependency graph for ClassMethodMacros.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BIO_CALL_CLASS_METHOD_LOOP_WITH_MACRO(loopName, iterationsMacro, ns, caller, argsMacro)
 
#define BIO_CLASS_METHOD(ns, caller, functionSignature, functionCall)
 
#define BIO_CLASS_METHOD_WITH_MACRO(ns, caller, macro)    BIO_CLASS_METHOD(ns, BIO_EXPAND_TUPLE caller, macro)
 
#define BIO_DISAMBIGUATE_ALL_CLASS_METHODS(ns, caller)
 
#define BIO_DISAMBIGUATE_OPTIONAL_CLASS_METHODS(ns, caller)
 
#define BIO_DISAMBIGUATE_REQUIRED_CLASS_METHODS(ns, caller)
 

Macro Definition Documentation

◆ BIO_CALL_CLASS_METHOD_LOOP_WITH_MACRO

#define BIO_CALL_CLASS_METHOD_LOOP_WITH_MACRO (   loopName,
  iterationsMacro,
  ns,
  caller,
  argsMacro 
)
Value:
loopName, \
iterationsMacro, \
ns, \
caller, \
argsMacro)
#define BIO_CALL_LOOP(loopName, iterations,...)
Definition: Macros.h:85

Calls a loop with the appropriate number of args

Parameters
loopNamebase name of loop to call (e.g. BIO_DEFINE_CLASS_METHODS_LOOP)
iterationsMacromacro that gives the number of iterations to loop over.
nsthe namespace for the given class
callera tuple containing the class
argsMacrothe arguments to be looped over (1 per iteration).

Definition at line 52 of file ClassMethodMacros.h.

◆ BIO_CLASS_METHOD

#define BIO_CLASS_METHOD (   ns,
  caller,
  functionSignature,
  functionCall 
)
Value:
functionSignature \
{ \
return this->ns::Class< caller >::functionCall; \
}

Define a virtual function that forwards to a Class. Currently only works for functions that have a non-void return type.

Definition at line 30 of file ClassMethodMacros.h.

◆ BIO_CLASS_METHOD_WITH_MACRO

#define BIO_CLASS_METHOD_WITH_MACRO (   ns,
  caller,
  macro 
)     BIO_CLASS_METHOD(ns, BIO_EXPAND_TUPLE caller, macro)

Definition at line 40 of file ClassMethodMacros.h.

◆ BIO_DISAMBIGUATE_ALL_CLASS_METHODS

#define BIO_DISAMBIGUATE_ALL_CLASS_METHODS (   ns,
  caller 
)
Value:
BIO_DISAMBIGUATE_OPTIONAL_CLASS_METHODS(ns, BIO_SINGLE_ARG(caller))
#define BIO_DISAMBIGUATE_REQUIRED_CLASS_METHODS(ns, caller)
#define BIO_SINGLE_ARG(...)
Definition: Macros.h:66

Ease of use wrapper for defining REQUIRED and OPTIONAL CLASS_METHODS.

Parameters
nsthe namespace of the class.
callerthe name of the class.

Definition at line 111 of file ClassMethodMacros.h.

◆ BIO_DISAMBIGUATE_OPTIONAL_CLASS_METHODS

#define BIO_DISAMBIGUATE_OPTIONAL_CLASS_METHODS (   ns,
  caller 
)
Value:
BIO_DEFINE_CLASS_METHODS_LOOP, \
BIO_GET_OPTIONAL_CLASS_METHODS_FOR_##ns() \
), \
ns, \
(caller), \
BIO_GET_OPTIONAL_CLASS_METHODS_FOR, \
ns \
) \
)
#define BIO_CALL_CLASS_METHOD_LOOP_WITH_MACRO(loopName, iterationsMacro, ns, caller, argsMacro)
#define BIO_GET_NUM_ARGS_OF_MACRO(macro)
Definition: NumArgsMacros.h:42
#define BIO_CALL_NS_MACRO(macroName, ns,...)
Definition: Macros.h:75

Calls the appropriate loop to define up to 99 class methods from BIO_GET_CLASS_OPTIONAL_METHODS_FOR_... NOTE: We call BIO_GET_OPTIONAL_CLASS_METHODS_FOR_##ns() with this. ns is lowercase. This deviates from the Biology macro naming scheme but improves usability, since we don't need to provide ns in lowercase and in uppercase.

Parameters
nsthe namespace of the class.
callerthe name of the class.

Definition at line 92 of file ClassMethodMacros.h.

◆ BIO_DISAMBIGUATE_REQUIRED_CLASS_METHODS

#define BIO_DISAMBIGUATE_REQUIRED_CLASS_METHODS (   ns,
  caller 
)
Value:
BIO_DEFINE_CLASS_METHODS_LOOP, \
BIO_GET_REQUIRED_CLASS_METHODS_FOR_##ns() \
), \
ns, \
(caller), \
BIO_GET_REQUIRED_CLASS_METHODS_FOR, \
ns \
) \
)

Calls the appropriate loop to define up to 99 class methods from BIO_GET_REQUIRED_CLASS_METHODS_FOR_... NOTE: We call BIO_GET_REQUIRED_CLASS_METHODS_FOR_##ns() with this. ns is lowercase. This deviates from the Biology macro naming scheme but improves usability, since we don't need to provide ns in lowercase and in uppercase.

Parameters
nsthe namespace of the class.
callerthe name of the class.

Definition at line 72 of file ClassMethodMacros.h.