29 if (ptgClassName.size()==1) {
30 switch (ptgClassName[0])
32 case '1': ptgClassName=
"CPTG_DiffDrive_C";
break;
33 case '2': ptgClassName=
"CPTG_DiffDrive_alpha";
break;
34 case '3': ptgClassName=
"CPTG_DiffDrive_CCS";
break;
35 case '4': ptgClassName=
"CPTG_DiffDrive_CC";
break;
36 case '5': ptgClassName=
"CPTG_DiffDrive_CS";
break;
48 THROW_EXCEPTION_FMT(
"[CreatePTG] Object of type `%s` seems not to be a PTG!",ptgClassName.c_str());
A wrapper for other CConfigFileBase-based objects that prefixes a given token to every key and/or sec...
void BASE_IMPEXP registerAllPendingClasses()
Register all pending classes - to be called just before de-serializing an object, for example...
void setPrefixes(const std::string &prefix_sections, const std::string &prefix_keys)
Change the prefix for sections and keys.
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
virtual void loadFromConfigFile(const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection) MRPT_OVERRIDE
Parameters accepted by this base class:
This class allows loading and storing values and vectors of different types from a configuration text...
This is the base class for any user-defined PTG.
mrpt::utils::CObject * createObject() const
const TRuntimeClassId BASE_IMPEXP * findRegisteredClass(const std::string &className)
Return info about a given class by its name, or NULL if the class is not registered.
GLsizei const GLchar ** string
std::string BASE_IMPEXP trim(const std::string &str)
Removes leading and trailing spaces.
A structure that holds runtime class type information.
static CParameterizedTrajectoryGenerator * CreatePTG(const std::string &ptgClassName, const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection, const std::string &sKeyPrefix)
The class factory for creating a PTG from a list of parameters in a section of a given config file (p...
void bind(const CConfigFileBase &o)
Make this object to wrap the given existing CConfigFileBase object.