Karlsruhe Institute of Technology (KIT) Logo

Master Motor Map

Whole-body human reference model and tools for unifying representations of whole-body human motion

Data Structures | Public Types | Public Member Functions | Static Public Member Functions
MMM::AbstractFactoryMethod< Base, constructorArg > Class Template Reference

Data Structures

struct  SubClassRegistry
 A helper struct to allow static initialisation of the subclass lookup table. More...
 

Public Types

typedef std::shared_ptr< Base >(* initialisationFunction) (constructorArg)
 The function pointer type of subclass initialisation functions. More...
 

Public Member Functions

bool checkBase ()
 Checks if the Plugin is valid base class.
 
std::string getDescription () const
 Return the description of the current instance.
 
std::string getPath () const
 Return the path of the current instance.
 
void setDescription (const std::string &newDescription)
 Set a description on the instance it is called on.
 
void setPath (const std::string &path)
 Set a path on the instance it is called on.
 

Static Public Member Functions

static std::shared_ptr< Base > createInstance (constructorArg)
 Initialisation function which needs to be provided by every subclass. More...
 
static std::shared_ptr< Base > first (constructorArg params)
 Function which can be used to retrieve the first registered object.
 
static std::shared_ptr< Base > fromName (const std::string &name, constructorArg params)
 Function which can be used to retrieve an object specified by string name.
 
static std::string getName ()
 Returns the class's name. More...
 
static std::vector< std::string > getSubclassList ()
 Return a list of all registered subclasses.
 
static void registerClass (const std::string &name, initialisationFunction init)
 Statically called by subclasses to register their name and initialisation function so they can be found by fromName.
 

Member Typedef Documentation

◆ initialisationFunction

template<typename Base , typename constructorArg >
typedef std::shared_ptr<Base>(* MMM::AbstractFactoryMethod< Base, constructorArg >::initialisationFunction) (constructorArg)

The function pointer type of subclass initialisation functions.

This matches the createInstance method.

Member Function Documentation

◆ createInstance()

template<typename Base , typename constructorArg >
static std::shared_ptr<Base> MMM::AbstractFactoryMethod< Base, constructorArg >::createInstance ( constructorArg  )
inlinestatic

Initialisation function which needs to be provided by every subclass.

It calls the constructor and returns a shared_ptr to the resulting object.

◆ getName()

template<typename Base , typename constructorArg >
static std::string MMM::AbstractFactoryMethod< Base, constructorArg >::getName ( )
inlinestatic

Returns the class's name.

This is used to identify the class which the user requests an instance of.


The documentation for this class was generated from the following file:
KoroiBot Logo WALK-MAN Logo Xperience Logo SecondHands Logo TimeStorm Logo I-SUPPORT Logo
PACO-PLUS Logo SFB-588 Logo SPP1527 Logo