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

Go to the source code of this file.

Macros

#define BIO_CREATE_EXCITATION_CLASS(wave, ret, num, ...)    BIO_EXCITATION_CLASS_##num(wave, ret, __VA_ARGS__)
 
#define BIO_CREATE_EXCITATION_CLASS_WITH_NUM(wave, ret, num, ...)    BIO_CREATE_EXCITATION_CLASS(wave, ret, num, __VA_ARGS__)
 
#define BIO_EXCITATION_CLASS(wave, ret, ...)
 
#define BIO_EXCITATION_CLASS_0(wave, ret, ...)    ::bio::chemical::ExcitationWithoutArgument< wave, ret >
 
#define BIO_EXCITATION_CLASS_1(wave, ret, ...)    ::bio::chemical::ExcitationWithArgument< wave, ret, __VA_ARGS__ >
 
#define BIO_EXCITATION_CLASS_2(wave, ret, ...)    ::bio::chemical::ExcitationWithTwoArguments< wave, ret, __VA_ARGS__ >
 

Macro Definition Documentation

◆ BIO_CREATE_EXCITATION_CLASS

#define BIO_CREATE_EXCITATION_CLASS (   wave,
  ret,
  num,
  ... 
)     BIO_EXCITATION_CLASS_##num(wave, ret, __VA_ARGS__)

Definition at line 33 of file ExcitationMacros.h.

◆ BIO_CREATE_EXCITATION_CLASS_WITH_NUM

#define BIO_CREATE_EXCITATION_CLASS_WITH_NUM (   wave,
  ret,
  num,
  ... 
)     BIO_CREATE_EXCITATION_CLASS(wave, ret, num, __VA_ARGS__)

Definition at line 36 of file ExcitationMacros.h.

◆ BIO_EXCITATION_CLASS

#define BIO_EXCITATION_CLASS (   wave,
  ret,
  ... 
)
Value:
wave, \
ret, \
BIO_GET_NUM_ARGS(__VA_ARGS__), \
__VA_ARGS__ \
)
#define BIO_CREATE_EXCITATION_CLASS_WITH_NUM(wave, ret, num,...)
#define BIO_GET_NUM_ARGS(...)
Definition: NumArgsMacros.h:34

Work around for C++ < 17, where variadic macros are supported but variadic template parameters are not. This will work with all versions of C++ (see undef below). NOTE: only a small number of arguments is currently supported with C++ < 17. For more arguments, you must either extend this macro by creating your own Excitation and defining BIO_EXCITATION_N, etc. or use at least C++17.

Parameters
wavea class deriving from physical::Wave* (a class, not an object)
retthe return type of the function to call
...any arguments to the function

Definition at line 47 of file ExcitationMacros.h.

◆ BIO_EXCITATION_CLASS_0

#define BIO_EXCITATION_CLASS_0 (   wave,
  ret,
  ... 
)     ::bio::chemical::ExcitationWithoutArgument< wave, ret >

Definition at line 24 of file ExcitationMacros.h.

◆ BIO_EXCITATION_CLASS_1

#define BIO_EXCITATION_CLASS_1 (   wave,
  ret,
  ... 
)     ::bio::chemical::ExcitationWithArgument< wave, ret, __VA_ARGS__ >

Definition at line 27 of file ExcitationMacros.h.

◆ BIO_EXCITATION_CLASS_2

#define BIO_EXCITATION_CLASS_2 (   wave,
  ret,
  ... 
)     ::bio::chemical::ExcitationWithTwoArguments< wave, ret, __VA_ARGS__ >

Definition at line 30 of file ExcitationMacros.h.