Class encoding a data type. More...
#include <Inventor/SbDataType.h>
Public Types | |
enum | DataType { UNSIGNED_BYTE = 0 , UNSIGNED_SHORT = 1 , UNSIGNED_INT32 = 2 , SIGNED_BYTE = 4 , SIGNED_SHORT = 5 , SIGNED_INT32 = 6 , FLOAT = 10 , DOUBLE = 11 , UNKNOWN = 0xFFFF } |
Supported Data type. More... | |
Public Member Functions | |
SbDataType (DataType type) | |
Copy constructor. | |
SbDataType (const SbString &type) | |
Constructor from a string. | |
SbDataType () | |
Default constructor. | |
operator unsigned int () const | |
DataType | getType () const |
Returns the type as an enum. | |
unsigned int | getSize () const |
Returns size in bytes of the type. | |
SbBool | isSigned () const |
Returns true if the type is signed. | |
SbBool | isInteger () const |
Returns true if the type is an integer type. | |
unsigned int | getNumBits () const |
Returns the numer of bits in the type. | |
SbString | getString () const |
Returns the type as a string, e.g. | |
double | getMin () const |
Returns the minimum value of the type. | |
double | getMax () const |
Returns the maximum value of the type. | |
template<> | |
SbDataType | getTemplateType (const unsigned char &) |
template<> | |
SbDataType | getTemplateType (const unsigned short &) |
template<> | |
SbDataType | getTemplateType (const uint32_t &) |
template<> | |
SbDataType | getTemplateType (const signed char &) |
template<> | |
SbDataType | getTemplateType (const signed short &) |
template<> | |
SbDataType | getTemplateType (const int &) |
template<> | |
SbDataType | getTemplateType (const float &) |
template<> | |
SbDataType | getTemplateType (const double &) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SbDataType type) |
ostream operator for SbDataType | |
Class encoding a data type.
This is a basic Open Inventor type that is used for representing a data type, for example unsigned int32, and some information about that type, for example is it signed or not. It is used by classes handling user buffers such as SoMemoryObject, SoSFArray2D, SoSFArray3D, SoSFImage and also SoDataSet.
SoMemoryObject, SoSFArray2D, SoSFArray3D
Definition at line 57 of file SbDataType.h.
enum SbDataType::DataType |
Supported Data type.
Definition at line 63 of file SbDataType.h.
|
inlineexplicit |
Copy constructor.
Definition at line 88 of file SbDataType.h.
SbDataType::SbDataType | ( | const SbString & | type | ) |
Constructor from a string.
Valid strings are the enum names.
|
inline |
Default constructor.
The initial value is UNSIGNED_BYTE.
Definition at line 99 of file SbDataType.h.
double SbDataType::getMax | ( | ) | const |
Returns the maximum value of the type.
double SbDataType::getMin | ( | ) | const |
Returns the minimum value of the type.
For floating point type, returns the minimum positive normalized value.
|
inline |
Returns the numer of bits in the type.
Definition at line 267 of file SbDataType.h.
|
inline |
Returns size in bytes of the type.
Definition at line 260 of file SbDataType.h.
SbString SbDataType::getString | ( | ) | const |
Returns the type as a string, e.g.
"FLOAT". See also getType().
|
inline |
Definition at line 396 of file SbDataType.h.
|
inline |
Definition at line 388 of file SbDataType.h.
|
inline |
Definition at line 380 of file SbDataType.h.
|
inline |
Definition at line 364 of file SbDataType.h.
|
inline |
Definition at line 372 of file SbDataType.h.
|
inline |
Definition at line 356 of file SbDataType.h.
|
inline |
Definition at line 340 of file SbDataType.h.
|
inline |
Definition at line 348 of file SbDataType.h.
|
inline |
|
inline |
Returns true if the type is an integer type.
Definition at line 274 of file SbDataType.h.
|
inline |
Returns true if the type is signed.
Definition at line 252 of file SbDataType.h.
|
inline |
Definition at line 245 of file SbDataType.h.
|
friend |
ostream operator for SbDataType
Definition at line 412 of file SbDataType.h.