A factor for subclasses of Interface. More...
#include <Registrar.h>
Classes | |
| struct | ClassDescriptor |
| The interface for class descriptors. More... | |
| struct | GenericClassDescriptor |
| A descriptor for a class C that provides parameters. More... | |
| struct | GenericClassDescriptorNoParam |
| A descriptor for a class C that does not provide any parameter. More... | |
Public Types | |
| typedef Interface | TargetType |
| alias to recover the template parameter | |
Public Member Functions | |
| ~Registrar () | |
| Destructor, remove all classes descriptors. | |
| void | reg (const std::string &name, ClassDescriptor *descriptor) |
| Register a class by storing an instance of a descriptor helper class. | |
| const ClassDescriptor * | getDescriptor (const std::string &name) const |
| Return a descriptor following a name, throw an exception if name is invalid. | |
| Interface * | create (const std::string &name, const Parametrizable::Parameters ¶ms=Parametrizable::Parameters()) const |
| Create an instance. | |
| Interface * | createFromYAML (const YAML::Node &module) const |
| Create an instance from a YAML node. | |
| const std::string | getDescription (const std::string &name) const |
| Get the description of a class. | |
| void | dump (std::ostream &stream) const |
| Print the list of registered classes to stream. | |
| DescriptorMap::const_iterator | begin () const |
| begin for const iterator over classes descriptions | |
| DescriptorMap::const_iterator | end () const |
| end for const iterator over classes descriptions | |
Protected Types | |
|
typedef std::map< std::string, ClassDescriptor * > | DescriptorMap |
| descriptors for sub-classes of Interface, indexed by their names | |
Protected Attributes | |
| DescriptorMap | classes |
| known classes that can be constructed | |
A factor for subclasses of Interface.
1.6.3