ConfigFunctor< readfunc, writefunc > Class Template Reference
[ConfigHandler - Runtime configuration from command line or config files]

Treat a functor as a ParameterNode, callable by config file. More...

#include <ConfigFunctor.hh>

Inheritance diagram for ConfigFunctor< readfunc, writefunc >:
VParameterNode

List of all members.

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

Detailed Description

template<typename readfunc, typename writefunc>
class ConfigFunctor< readfunc, writefunc >

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Jun 2014 for daqman by  doxygen 1.6.1