Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
PointMatcherSupport::Parametrizable Struct Reference

The superclass of classes that are constructed using generic parameters. This class provides the parameter storage and fetching mechanism. More...

#include <Parametrizable.h>

Inheritance diagram for PointMatcherSupport::Parametrizable:
Inheritance graph
[legend]

Classes

struct  InvalidParameter
 An exception thrown when one tries to fetch the value of an unexisting parameter. More...
 
struct  ParameterDoc
 The documentation of a parameter. More...
 

Public Types

typedef bool(* LexicalComparison) (std::string a, std::string b)
 A function that returns whether a is smaller than b. More...
 
typedef std::string Parameter
 alias More...
 
typedef std::map< std::string, ParameterParameters
 Parameters stored as a map of string->string. More...
 
typedef std::vector< ParameterDocParametersDoc
 The documentation of all parameters. More...
 
typedef std::set< std::string > ParametersUsed
 Parameters whose value has been read. More...
 

Public Member Functions

template<typename S >
get (const std::string &paramName)
 Return the value of paramName, lexically-casted to S. More...
 
std::string getParamValueString (const std::string &paramName)
 Get the value of a parameter, as a string. More...
 
template<typename T >
std::vector< T > getVector (const std::string &paramName)
 Return the value of paramName, lexically-casted std::vector<S> More...
 
 Parametrizable ()
 Construct a documentation of parameters from a description in the source. More...
 
 Parametrizable (const std::string &className, const ParametersDoc paramsDoc, const Parameters &params)
 Construct with documented parameters. More...
 
virtual ~Parametrizable ()
 Virtual destructor, do nothing. More...
 

Static Public Member Functions

template<typename S >
static bool Comp (std::string a, std::string b)
 Return whether a < b, lexically casted to S. More...
 

Public Attributes

const std::string className
 name of the class More...
 
Parameters parameters
 parameters with their values encoded in string More...
 
const ParametersDoc parametersDoc
 documentation of parameters More...
 
ParametersUsed parametersUsed
 parameters whose value has actually been read More...
 

Friends

std::ostream & operator<< (std::ostream &o, const Parametrizable &p)
 Dump the documentation of this object to a stream. More...
 

Detailed Description

The superclass of classes that are constructed using generic parameters. This class provides the parameter storage and fetching mechanism.

Definition at line 141 of file Parametrizable.h.

Member Typedef Documentation

◆ LexicalComparison

typedef bool(* PointMatcherSupport::Parametrizable::LexicalComparison) (std::string a, std::string b)

A function that returns whether a is smaller than b.

Definition at line 150 of file Parametrizable.h.

◆ Parameter

alias

Definition at line 198 of file Parametrizable.h.

◆ Parameters

Parameters stored as a map of string->string.

Definition at line 199 of file Parametrizable.h.

◆ ParametersDoc

The documentation of all parameters.

Definition at line 187 of file Parametrizable.h.

◆ ParametersUsed

Parameters whose value has been read.

Definition at line 200 of file Parametrizable.h.

Constructor & Destructor Documentation

◆ Parametrizable() [1/2]

PointMatcherSupport::Parametrizable::Parametrizable ( )

Construct a documentation of parameters from a description in the source.

Construct an unknown class without parameters

Definition at line 165 of file Parametrizable.cpp.

◆ Parametrizable() [2/2]

PointMatcherSupport::Parametrizable::Parametrizable ( const std::string &  className,
const ParametersDoc  paramsDoc,
const Parameters params 
)

Construct with documented parameters.

Definition at line 170 of file Parametrizable.cpp.

◆ ~Parametrizable()

PointMatcherSupport::Parametrizable::~Parametrizable ( )
virtual

Virtual destructor, do nothing.

Definition at line 195 of file Parametrizable.cpp.

Member Function Documentation

◆ Comp()

template<typename S >
static bool PointMatcherSupport::Parametrizable::Comp ( std::string  a,
std::string  b 
)
inlinestatic

Return whether a < b, lexically casted to S.

Definition at line 154 of file Parametrizable.h.

◆ get()

template<typename S >
S PointMatcherSupport::Parametrizable::get ( const std::string &  paramName)
inline

Return the value of paramName, lexically-casted to S.

Definition at line 215 of file Parametrizable.h.

◆ getParamValueString()

std::string PointMatcherSupport::Parametrizable::getParamValueString ( const std::string &  paramName)

Get the value of a parameter, as a string.

Definition at line 199 of file Parametrizable.cpp.

◆ getVector()

template<typename T >
std::vector<T> PointMatcherSupport::Parametrizable::getVector ( const std::string &  paramName)
inline

Return the value of paramName, lexically-casted std::vector<S>

Definition at line 219 of file Parametrizable.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const Parametrizable p 
)
friend

Dump the documentation of this object to a stream.

Definition at line 62 of file Parametrizable.cpp.

Member Data Documentation

◆ className

const std::string PointMatcherSupport::Parametrizable::className

name of the class

Definition at line 202 of file Parametrizable.h.

◆ parameters

Parameters PointMatcherSupport::Parametrizable::parameters

parameters with their values encoded in string

Definition at line 204 of file Parametrizable.h.

◆ parametersDoc

const ParametersDoc PointMatcherSupport::Parametrizable::parametersDoc

documentation of parameters

Definition at line 203 of file Parametrizable.h.

◆ parametersUsed

ParametersUsed PointMatcherSupport::Parametrizable::parametersUsed

parameters whose value has actually been read

Definition at line 205 of file Parametrizable.h.


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


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