|
libbio
|

Go to the source code of this file.
Macros | |
| #define | BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS(ns, class, ...) |
| #define | BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS_WITH_COMMON_CONSTRUCTOR(ns, class, ...) |
| #define BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS | ( | ns, | |
| class, | |||
| ... | |||
| ) |
Defines constructors for classes deriving from chemical::Class and beyond.
These will allow you to construct your object with either a name or an id.
We also define the empty constructor for when neither name nor id are supplied.
IMPORTANT: despite using VA_ARGS, this will fail if nothing more than the namespace and class are provided.
At a minimum, you MUST ALSO INCLUDE THE Filter AFTER class!
e.g. BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS(my_namespace, MyClass, filter::Default())
NOTE: if your class has multiple template args or otherwise uses commas in its name, you must enclose it in BIO_SINGLE_ARG() so as to not have it be considered part of the VA_ARGS.
| ns | the namespace of the class |
| class | the name of the class |
| ... | all arguments to the ns::Class<class>(...) constructor. |
| #define BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS_WITH_COMMON_CONSTRUCTOR | ( | ns, | |
| class, | |||
| ... | |||
| ) |
Defines constructors for classes deriving from chemical::Class and beyond.
All constructors call a CommonConstructor() method with no args.
These will allow you to construct your object with either a name or an id.
We also define the empty constructor for when neither name nor id are supplied.
IMPORTANT: despite using VA_ARGS, this will fail if nothing more than the namespace and class are provided.
At a minimum, you MUST ALSO INCLUDE THE Filter AFTER class!
e.g. BIO_DEFAULT_IDENTIFIABLE_CONSTRUCTORS(my_namespace, MyClass, filter::Default())
NOTE: if your class has multiple template args or otherwise uses commas in its name, you must enclose it in BIO_SINGLE_ARG() so as to not have it be considered part of the VA_ARGS.
| ns | the namespace of the class |
| class | the name of the class |
| ... | all arguments to the ns::Class<class>(...) constructor. |