SOFA API  59c939c2
Open source framework for multi-physics simuation
sofa::defaulttype::TemplateAliases Class Reference

#include <TemplatesAliases.h>

Class used to store and resolve template aliases. More...

Detailed Description

Class used to store and resolve template aliases.

See also
RegisterTemplateAlias for how new aliases should be registered.

Static Public Member Functions

static bool addAlias (const std::string &name, const std::string &result, const bool doWarnUser)
 
static std::string resolveAlias (const std::string &name)
 Get the template pointed to by the alias. Returns the input if there is no alias. More...
 
static const TemplateAliasgetTemplateAlias (const std::string &name)
 Get the alias template associated with a given name. Return false & nullptr if none;. More...
 

Function details

bool sofa::defaulttype::TemplateAliases::addAlias ( const std::string &  name,
const std::string &  result,
const bool  doWarnUser 
)
static

Add an alias for a template

Parameters
namename of the new alias
resultreal template pointed to
const TemplateAlias * sofa::defaulttype::TemplateAliases::getTemplateAlias ( const std::string &  name)
static

Get the alias template associated with a given name. Return false & nullptr if none;.

std::string sofa::defaulttype::TemplateAliases::resolveAlias ( const std::string &  name)
static

Get the template pointed to by the alias. Returns the input if there is no alias.