38 for (it=possibleTypes.begin();it<possibleTypes.end();++it)
60 possibleTypes.clear();
66 possibleTypes.push_back( aux );
70 in >> i; selection = i;
86 possibleTypes.clear();
107 if (selection>=possibleTypes.size())
110 return possibleTypes[selection];
118 size_t i,
n = possibleTypes.size();
125 selection = (
unsigned int)i;
139 outPosibilities = possibleTypes;
147 return !strcmp( possibleTypes[selection].c_str(),
type);
155 return !strcmp( possibleTypes[selection].c_str(),
type.c_str());
163 size_t n = possibleTypes.size();
164 for (
size_t i=0;i<
n;i++)
void setType(const std::string &type)
Sets the currently selected type.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
virtual ~CTypeSelector()
Destructor.
This namespace provides a OS-independent interface to many useful functions: filenames manipulation...
The virtual base class which provides a unified interface for all persistent objects in MRPT...
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
#define THROW_EXCEPTION(msg)
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
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...
CTypeSelector(std::string posibilitiesList="", std::string defaultType="")
Default constructor.
const Scalar * const_iterator
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void readFromStream(mrpt::utils::CStream &in, int version)
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
bool isType(const char *type) const
Fast check for a given type, returns true if the selection is exactly the specified type name...
GLsizei const GLchar ** string
std::string getType() const
Gets the currently selected type, from the set of posibilities.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
int BASE_IMPEXP _strcmpi(const char *str1, const char *str2) MRPT_NO_THROWS
An OS-independent version of strcmpi.
void getTypePosibilities(std::vector< std::string > &outPosibilities) const
Returns the set of posibilities in the "type" represented by this class.
This class represents a std::string derived class which is also CSerializable.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
unsigned __int32 uint32_t
void BASE_IMPEXP tokenize(const std::string &inString, const std::string &inDelimiters, std::deque< std::string > &outTokens, bool skipBlankTokens=true) MRPT_NO_THROWS
Tokenizes a string according to a set of delimiting characters.
GLuint GLuint GLsizei GLenum type