Classes | Namespaces | Macros | Functions
Registrar.h File Reference
#include "Parametrizable.h"
#include "PointMatcher.h"
#include <yaml-cpp/yaml.h>
#include <boost/format.hpp>
#include <boost/typeof/typeof.hpp>
Include dependency graph for Registrar.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PointMatcherSupport::Registrar< Interface >::ClassDescriptor
 The interface for class descriptors. More...
 
struct  PointMatcherSupport::Registrar< Interface >::GenericClassDescriptor< C >
 A descriptor for a class C that provides parameters. More...
 
struct  PointMatcherSupport::Registrar< Interface >::GenericClassDescriptorNoParam< C >
 A descriptor for a class C that does not provide any parameter. More...
 
struct  PointMatcherSupport::InvalidElement
 An exception thrown when one tries to instanciate an element that does not exist in the registrar. More...
 
struct  PointMatcherSupport::Registrar< Interface >
 A factor for subclasses of Interface. More...
 

Namespaces

 PointMatcherSupport
 Functions and classes that are not dependant on scalar type are defined in this namespace.
 

Macros

#define ADD_TO_REGISTRAR(name, elementName, element)
 
#define ADD_TO_REGISTRAR_NO_PARAM(name, elementName, element)
 
#define DEF_REGISTRAR(name)   PointMatcherSupport::Registrar< name > name##Registrar;
 
#define DEF_REGISTRAR_IFACE(name, ifaceName)   PointMatcherSupport::Registrar< ifaceName > name##Registrar;
 
#define REG(name)   name##Registrar
 

Functions

void PointMatcherSupport::getNameParamsFromYAML (const YAML::Node &module, std::string &name, Parametrizable::Parameters &params)
 Retrieve name and parameters from a yaml node. More...
 

Macro Definition Documentation

◆ ADD_TO_REGISTRAR

#define ADD_TO_REGISTRAR (   name,
  elementName,
  element 
)
Value:
{ \
typedef typename PointMatcherSupport::Registrar< name >::template GenericClassDescriptor< element > Desc; \
name##Registrar.reg(# elementName, std::make_shared<Desc>() ); \
}

Definition at line 212 of file Registrar.h.

◆ ADD_TO_REGISTRAR_NO_PARAM

#define ADD_TO_REGISTRAR_NO_PARAM (   name,
  elementName,
  element 
)
Value:
{ \
typedef typename PointMatcherSupport::Registrar< name >::template GenericClassDescriptorNoParam< element > Desc; \
name##Registrar.reg(# elementName, std::make_shared<Desc>() ); \
}

Definition at line 216 of file Registrar.h.

◆ DEF_REGISTRAR

#define DEF_REGISTRAR (   name)    PointMatcherSupport::Registrar< name > name##Registrar;

Definition at line 210 of file Registrar.h.

◆ DEF_REGISTRAR_IFACE

#define DEF_REGISTRAR_IFACE (   name,
  ifaceName 
)    PointMatcherSupport::Registrar< ifaceName > name##Registrar;

Definition at line 211 of file Registrar.h.

◆ REG

#define REG (   name)    name##Registrar

Definition at line 209 of file Registrar.h.

PointMatcherSupport::Registrar
A factor for subclasses of Interface.
Definition: Registrar.h:59
PointMatcherSupport::Registrar::reg
void reg(const std::string &name, std::shared_ptr< ClassDescriptor > descriptor)
Register a class by storing an instance of a descriptor helper class.
Definition: Registrar.h:139


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