10#define CTypeSelector_H
43 CTypeSelector(std::string posibilitiesList =
"", std::string defaultType =
"");
65 bool isType(
const std::string &type)
const;
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
This class represents a std::string derived class which is also CSerializable.
unsigned int selection
The selected one:
CTypeSelector(std::string posibilitiesList="", std::string defaultType="")
Default constructor.
bool isType(const std::string &type) const
Fast check for a given type, returns true if the selection is exactly the specified type name.
bool isType(const char *type) const
Fast check for a given type, returns true if the selection is exactly the specified type name.
void setType(const std::string &type)
Sets the currently selected type.
int checkTypeIndex(const std::string &type) const
Returns the index of a given type within the list of all possible types, or -1 if the given string is...
virtual ~CTypeSelector()
Destructor.
std::string getType() const
Gets the currently selected type, from the set of posibilities.
void getTypePosibilities(std::vector< std::string > &outPosibilities) const
Returns the set of posibilities in the "type" represented by this class.
std::vector< std::string > possibleTypes
The possibilities.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.