![]() |
last update 20 Sep 2009 |
![]() |
#include <cvrClassName.h>
Public Member Functions | |
className () | |
~className () | |
Static Public Member Functions | |
static std::string | get (const object *o) |
static std::string | get (const object &o) |
static void | get (const object &o, std::string &result) |
static void | get (const object *o, std::string &result) |
static std::string | demangle (const std::string &mangled) |
This class uses the std::string container to avoid possible memory leaks.
cvr::className::className | ( | ) |
Default constructor.
cvr::className::~className | ( | ) |
Destructor.
static std::string cvr::className::demangle | ( | const std::string & | mangled | ) | [static] |
Demangle.
You can use this methods to gain the name of a class that is not inherited from cvr::object.
The input is the one given by typeid().name()
Example:
cvr::point<float> p; std::string typeOfP = className::demangle(typeid(p).name());
static void cvr::className::get | ( | const object * | o, | |
std::string & | result | |||
) | [static] |
Return the name of the given type.
This class uses the std::typeinfo functions, but it "demangles" the output to produce a valid C++ type name, i.e. the returned string considers the template arguments and is usually fully qualified.
The implementations should ensure that the returned name has the following format:
<namespace>::<classname>::<innerclassname>::...
Example:
cvr::boundingBox<double>::parameters
The name is returned in the result parameter. This is a much safer method than the method returning a pointer.
static void cvr::className::get | ( | const object & | o, | |
std::string & | result | |||
) | [static] |
Return the name of the given type.
This class uses the std::typeinfo functions, but it "demangles" the output to produce a valid C++ type name, i.e. the returned string considers the template arguments and is usually fully qualified.
The implementations should ensure that the returned name has the following format:
<namespace>::<classname>::<innerclassname>::...
Example:
cvr::boundingBox<double>::parameters
The name is returned in the result parameter. This is a much safer method than the method returning a pointer.
static std::string cvr::className::get | ( | const object & | o | ) | [static] |
static std::string cvr::className::get | ( | const object * | o | ) | [static] |
Return the name of the given type.
This class uses the std::typeinfo functions, but it "demangles" the output to produce a valid C++ type name, i.e. the returned string considers the template arguments and is usually fully qualified.
The implementations should ensure that the returned name has the following format:
<namespace>::<classname>::<innerclassname>::...
Example:
cvr::boundingBox<double>::parameters