fromString support for BBM More...
Go to the source code of this file.
Macros | |
| #define | BBM_EXPORT_BSDFMODEL(BsdfModel) make_named<BsdfModel<Config>::name>( bbm::fromString<BsdfModel<Config>> ), |
fromString support for BBM
Export bbm::fromString<BsdfMOdel> method calls to a named tuple with the name set to BsdfModel::name.
| BsdfModel | = the class name of the BSDF model to create a fromString handle for |
Assumes that:
The macro will construct a named tuple with a single name (the BsdfModel::name), and a function pointer to the corresponding bbm::fromString<BsdfModel> specialization as value.
Note: the creation of the named tuple is followed by a comma, not a semi comma. It is expected that all named tuples from the different bsdfmodel are then concat in a single tuple. See bsdf_ptr for it usage. Example:
This example will create a bsdf_fromString named tuple, where the names are the bsdfmodel names, and the values are function pointers to the corresponding fromString method. The second line passes a string to the fromString method that corresponds to the Lambertian bsdfmodel.
Note: because each entry ends with a comma, we need to add one 'dummy' entry to close the list of named tuples.
| #define BBM_EXPORT_BSDFMODEL | ( | BsdfModel | ) | make_named<BsdfModel<Config>::name>( bbm::fromString<BsdfModel<Config>> ), |