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 | |
| DescriptorMap::const_iterator | begin () const |
| begin for const iterator over classes descriptions | |
| Interface * | create (const std::string &name, const Parametrizable::Parameters ¶ms=Parametrizable::Parameters()) const |
| Create an instance. | |
| void | dump (std::ostream &stream) const |
| Print the list of registered classes to stream. | |
| DescriptorMap::const_iterator | end () const |
| end for const iterator over classes descriptions | |
| const std::string | getDescription (const std::string &name) const |
| Get the description of a class. | |
| const ClassDescriptor * | getDescriptor (const std::string &name) const |
| Return a descriptor following a name, throw an exception if name is invalid. | |
| void | reg (const std::string &name, ClassDescriptor *descriptor) |
| Register a class by storing an instance of a descriptor helper class. | |
| ~Registrar () | |
| Destructor, remove all classes descriptors. | |
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.
Definition at line 57 of file Registrar.h.
typedef std::map<std::string, ClassDescriptor*> PointMatcherSupport::Registrar< Interface >::DescriptorMap [protected] |
descriptors for sub-classes of Interface, indexed by their names
Definition at line 127 of file Registrar.h.
| typedef Interface PointMatcherSupport::Registrar< Interface >::TargetType |
alias to recover the template parameter
Definition at line 60 of file Registrar.h.
| PointMatcherSupport::Registrar< Interface >::~Registrar | ( | ) | [inline] |
Destructor, remove all classes descriptors.
Definition at line 132 of file Registrar.h.
| DescriptorMap::const_iterator PointMatcherSupport::Registrar< Interface >::begin | ( | ) | const [inline] |
begin for const iterator over classes descriptions
Definition at line 210 of file Registrar.h.
| Interface* PointMatcherSupport::Registrar< Interface >::create | ( | const std::string & | name, |
| const Parametrizable::Parameters & | params = Parametrizable::Parameters() |
||
| ) | const [inline] |
Create an instance.
Definition at line 159 of file Registrar.h.
| void PointMatcherSupport::Registrar< Interface >::dump | ( | std::ostream & | stream | ) | const [inline] |
Print the list of registered classes to stream.
Definition at line 203 of file Registrar.h.
| DescriptorMap::const_iterator PointMatcherSupport::Registrar< Interface >::end | ( | ) | const [inline] |
end for const iterator over classes descriptions
Definition at line 215 of file Registrar.h.
| const std::string PointMatcherSupport::Registrar< Interface >::getDescription | ( | const std::string & | name | ) | const [inline] |
Get the description of a class.
Definition at line 197 of file Registrar.h.
| const ClassDescriptor* PointMatcherSupport::Registrar< Interface >::getDescriptor | ( | const std::string & | name | ) | const [inline] |
Return a descriptor following a name, throw an exception if name is invalid.
Definition at line 144 of file Registrar.h.
| void PointMatcherSupport::Registrar< Interface >::reg | ( | const std::string & | name, |
| ClassDescriptor * | descriptor | ||
| ) | [inline] |
Register a class by storing an instance of a descriptor helper class.
Definition at line 138 of file Registrar.h.
DescriptorMap PointMatcherSupport::Registrar< Interface >::classes [protected] |
known classes that can be constructed
Definition at line 128 of file Registrar.h.