|
fw4spl
|
Class defining an elementary C++ type aka unsigned char, signed char, .... signed long, float, double. More...
#include <DynamicType.hpp>
Collaboration diagram for fwTools::DynamicType:Public Types | |
| typedef boost::mpl::vector< signed char, unsigned char, signed short, unsigned short, signed int, unsigned int, unsigned long, signed long, float, double >::type | SupportedTypes |
Public Member Functions | |
| FWTOOLS_API | DynamicType () |
| Default constructor. | |
| FWTOOLS_API | DynamicType (const DynamicType &) |
| Constructor by copy. | |
| FWTOOLS_API bool | operator== (const DynamicType &) const |
| comparison operator | |
| FWTOOLS_API bool | operator!= (const DynamicType &) const |
| comparison operator | |
| FWTOOLS_API bool | operator< (const DynamicType &) const |
| define an order (lexicographic) for dynamicType | |
| template<class TYPE > | |
| void | setType () |
| Set DynamicType value according given template. More... | |
| template<class TYPE > | |
| bool | isType () const |
| Return true iff the DynamicType value represents the TYPE. More... | |
| FWTOOLS_API unsigned char | sizeOf () const |
| Return the sizeof of the type. | |
| virtual FWTOOLS_API | ~DynamicType () |
| Default destrucor : do nothing. | |
| FWTOOLS_API const std::string & | string () const |
| Return a human readable string. | |
| template<class T > | |
| std::pair< T, T > | minMax () |
| return the min and max storable in the DynamicType. take care that min/max value are casted into template T | |
| FWTOOLS_API bool | isFixedPrecision () |
| return true iff the type use a fixed precision | |
| FWTOOLS_API bool | isSigned () |
| return true iff the type is signed | |
Static Public Member Functions | |
| template<class NEWTYPE > | |
| static void | registerNewType (const std::string &newKey) |
| Register a new type to be managed within DynamicType. More... | |
| template<class TYPE > | |
| static const std::string | string () |
| Return a human readable string for type (static version no instanciation ...) More... | |
Protected Attributes | |
| std::string | m_value |
| unsigned char | m_sizeof |
Static Protected Attributes | |
| static FWTOOLS_API std::list< std::string > | m_managedTypes |
| Container of types managed by DynamicType. More... | |
| static FWTOOLS_API const std::string | m_unSpecifiedType = std::string("UNSPECIFIED TYPE") |
| Value for not specified type. | |
Class defining an elementary C++ type aka unsigned char, signed char, .... signed long, float, double.
Definition at line 31 of file DynamicType.hpp.
| bool fwTools::DynamicType::isType | ( | ) | const |
Return true iff the DynamicType value represents the TYPE.
Definition at line 89 of file DynamicType.hxx.
|
static |
Register a new type to be managed within DynamicType.
Check are performed to ensure robsutess
Definition at line 105 of file DynamicType.hxx.
References setType().
Here is the call graph for this function:| void fwTools::DynamicType::setType | ( | ) |
Set DynamicType value according given template.
Definition at line 69 of file DynamicType.hxx.
Referenced by registerNewType(), and string().
Here is the caller graph for this function:
|
static |
Return a human readable string for type (static version no instanciation ...)
Use a DynamicType::string<int>();
Definition at line 96 of file DynamicType.hxx.
References setType(), and string().
Here is the call graph for this function:
|
staticprotected |
Container of types managed by DynamicType.
Definition at line 131 of file DynamicType.hpp.