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 More...
 

Public Member Functions

DescriptorMap::const_iterator begin () const
 begin for const iterator over classes descriptions More...
 
std::shared_ptr< Interface > create (const std::string &name, const Parametrizable::Parameters &params=Parametrizable::Parameters()) const
 Create an instance. More...
 
std::shared_ptr< Interface > createFromYAML (const YAML::Node &module) const
 Create an instance from a YAML node. More...
 
void dump (std::ostream &stream) const
 Print the list of registered classes to stream. More...
 
DescriptorMap::const_iterator end () const
 end for const iterator over classes descriptions More...
 
const Parametrizable::ParametersDoc getAvailableParameters (const std::string &name) const
 Get all available parameters of a class. More...
 
const std::string getDescription (const std::string &name) const
 Get the description of a class. More...
 
std::shared_ptr< ClassDescriptorgetDescriptor (const std::string &name) const
 Return a descriptor following a name, throw an exception if name is invalid. More...
 
void reg (const std::string &name, std::shared_ptr< ClassDescriptor > descriptor)
 Register a class by storing an instance of a descriptor helper class. More...
 

Protected Types

typedef std::map< std::string, std::shared_ptr< ClassDescriptor > > DescriptorMap
 descriptors for sub-classes of Interface, indexed by their names More...
 

Protected Attributes

DescriptorMap classes
 known classes that can be constructed More...
 

Detailed Description

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

A factor for subclasses of Interface.

Definition at line 59 of file Registrar.h.

Member Typedef Documentation

◆ DescriptorMap

template<typename Interface >
typedef std::map<std::string, std::shared_ptr<ClassDescriptor> > PointMatcherSupport::Registrar< Interface >::DescriptorMap
protected

descriptors for sub-classes of Interface, indexed by their names

Definition at line 134 of file Registrar.h.

◆ TargetType

template<typename Interface >
typedef Interface PointMatcherSupport::Registrar< Interface >::TargetType

alias to recover the template parameter

Definition at line 62 of file Registrar.h.

Member Function Documentation

◆ begin()

template<typename Interface >
DescriptorMap::const_iterator PointMatcherSupport::Registrar< Interface >::begin ( ) const
inline

begin for const iterator over classes descriptions

Definition at line 197 of file Registrar.h.

◆ create()

template<typename Interface >
std::shared_ptr<Interface> PointMatcherSupport::Registrar< Interface >::create ( const std::string &  name,
const Parametrizable::Parameters params = Parametrizable::Parameters() 
) const
inline

Create an instance.

Definition at line 161 of file Registrar.h.

◆ createFromYAML()

template<typename Interface >
std::shared_ptr<Interface> PointMatcherSupport::Registrar< Interface >::createFromYAML ( const YAML::Node &  module) const
inline

Create an instance from a YAML node.

Definition at line 167 of file Registrar.h.

◆ dump()

template<typename Interface >
void PointMatcherSupport::Registrar< Interface >::dump ( std::ostream &  stream) const
inline

Print the list of registered classes to stream.

Definition at line 190 of file Registrar.h.

◆ end()

template<typename Interface >
DescriptorMap::const_iterator PointMatcherSupport::Registrar< Interface >::end ( ) const
inline

end for const iterator over classes descriptions

Definition at line 203 of file Registrar.h.

◆ getAvailableParameters()

template<typename Interface >
const Parametrizable::ParametersDoc PointMatcherSupport::Registrar< Interface >::getAvailableParameters ( const std::string &  name) const
inline

Get all available parameters of a class.

Definition at line 184 of file Registrar.h.

◆ getDescription()

template<typename Interface >
const std::string PointMatcherSupport::Registrar< Interface >::getDescription ( const std::string &  name) const
inline

Get the description of a class.

Definition at line 178 of file Registrar.h.

◆ getDescriptor()

template<typename Interface >
std::shared_ptr<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 145 of file Registrar.h.

◆ reg()

template<typename Interface >
void PointMatcherSupport::Registrar< Interface >::reg ( const std::string &  name,
std::shared_ptr< ClassDescriptor descriptor 
)
inline

Register a class by storing an instance of a descriptor helper class.

Definition at line 139 of file Registrar.h.

Member Data Documentation

◆ classes

template<typename Interface >
DescriptorMap PointMatcherSupport::Registrar< Interface >::classes
protected

known classes that can be constructed

Definition at line 135 of file Registrar.h.


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


libpointmatcher
Author(s):
autogenerated on Mon Sep 16 2024 02:24:11