libpointmatcher  1.3.1
Classes | Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
PointMatcherSupport::Registrar< Interface > Struct Template Reference

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 ClassDescriptorgetDescriptor (const std::string &name) const
 Return a descriptor following a name, throw an exception if name is invalid.
 
std::shared_ptr< Interface > create (const std::string &name, const Parametrizable::Parameters &params=Parametrizable::Parameters()) const
 Create an instance.
 
std::shared_ptr< 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
 

Detailed Description

template<typename Interface>
struct PointMatcherSupport::Registrar< Interface >

A factor for subclasses of Interface.


The documentation for this struct was generated from the following file: