23 for (
const auto& i :
data)
24 if (i->derivedFrom(
id))
return true;
32 for (
const auto& i :
data)
34 if (cnt++ != 0)
s +=
", ";
43 s.erase(
s.begin(), std::find_if(
s.begin(),
s.end(), [](
const char c) {
44 return !std::isspace(
c);
54 s.rbegin(),
s.rend(), [](
const char c) {
return !std::isspace(
c); })
67 std::stringstream ss(
s);
69 while (std::getline(ss, lin,
','))
74 id !=
nullptr,
format(
"Unknown class name: %s", lin.c_str()));
#define MRPT_TRY_END
The end of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an ex...
A structure that holds runtime class type information.
void insert(const mrpt::rtti::TRuntimeClassId *id)
Insert a class in the list.
#define MRPT_TRY_START
The start of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an ...
static std::string & ltrim(std::string &s)
static std::string & trim(std::string &s)
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
static std::string & rtrim(std::string &s)
GLsizei const GLchar ** string
const TRuntimeClassId * findRegisteredClass(const std::string &className)
Return info about a given class by its name, or nullptr if the class is not registered.
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
bool containsDerivedFrom(const mrpt::rtti::TRuntimeClassId *id) const
Does the list contains a class derived from...?
GLsizei GLsizei GLenum GLenum const GLvoid * data
void fromString(const std::string &s)
Builds from a string representation of the list, for example: "CPose2D, CObservation, CPose3D".
std::string toString() const
Return a string representation of the list, for example: "CPose2D, CObservation, CPose3D".