SOFA API  679a9147
Open source framework for multi-physics simuation
sofa::core::ComponentNameHelper Class Reference

#include <ComponentNameHelper.h>

Detailed Description

Helper class to name a component based on its type.

Two conventions are available for legacy reasons:

  • XML: use a counter to add a unique suffix at the end of the name
  • Python: the short name of the type is returned

Public Member Functions

std::string resolveName (const std::string &type, const std::string &name, Convention convention)
 
std::string resolveName (const std::string &type, Convention convention)
 

Function details

◆ resolveName() [1/2]

std::string sofa::core::ComponentNameHelper::resolveName ( const std::string &  type,
const std::string &  name,
Convention  convention 
)

◆ resolveName() [2/2]

std::string sofa::core::ComponentNameHelper::resolveName ( const std::string &  type,
Convention  convention 
)

Enum details

◆ Convention

Enumerator
xml 
python