Treat a functor as a ParameterNode, callable by config file. More...
#include <ConfigFunctor.hh>
Public Member Functions | |
ConfigFunctor (const readfunc &r, const writefunc &w, const std::string &key="", const std::string &helptext="") | |
std::istream & | ReadFrom (std::istream &in, bool dummy=0) |
Read this parameter from an istream. | |
std::ostream & | WriteTo (std::ostream &out, bool dummy1=0, int dummy=0) const |
Write this parameter to an ostream. | |
ConfigFunctor< readfunc, writefunc > * | Clone (const void *from, void *to) const |
Clone the object onto a new parameter list. | |
Private Attributes | |
readfunc | reader |
writefunc | writer |
Treat a functor as a ParameterNode, callable by config file.
This class allows the user to perform operations on a ParameterList-derived class more complicated than operations on a single variable, such as resetting lists, adding elements, etc.
To use, define a functor with an operator() that takes an iostream object. If you only want read OR write operations, use the ConfigFunctorDummy* structs.
This class is used in the ParameterList functions RegisterFunction, RegisterReadFunction, and RegisterWriteFunction
Definition at line 34 of file ConfigFunctor.hh.