Inviwo 0.9.12-pre
Inviwo documentation
|
Defines general useful formats and new data types Non-virtual, meaning no dynamic_cast as string comparison is as fast/faster. More...
#include <formats.h>
Public Member Functions | |
size_t | getSizeInBytes () const |
size_t | getSize () const |
size_t | getComponents () const |
size_t | getPrecision () const |
NumericType | getNumericType () const |
double | getMax () const |
double | getMin () const |
double | getLowest () const |
std::string_view | getString () const |
DataFormatId | getId () const |
Static Public Member Functions | |
static const DataFormatBase * | get () |
static const DataFormatBase * | get (DataFormatId id) |
static const DataFormatBase * | get (std::string_view name) |
static const DataFormatBase * | get (NumericType type, size_t components, size_t precision) |
template<typename T > | |
static constexpr DataFormatId | typeToId () noexcept |
Protected Member Functions | |
DataFormatBase (DataFormatId type, size_t components, size_t size, double max, double min, double lowest, NumericType nt, std::string_view s) | |
DataFormatBase (const DataFormatBase &)=delete | |
DataFormatBase (DataFormatBase &&)=delete | |
DataFormatBase & | operator= (const DataFormatBase &)=delete |
DataFormatBase & | operator= (DataFormatBase &&)=delete |
Protected Attributes | |
DataFormatId | formatId_ |
size_t | components_ |
size_t | sizeInBytes_ |
NumericType | numericType_ |
double | max_ |
double | min_ |
double | lowest_ |
std::string_view | formatStr_ |
Defines general useful formats and new data types Non-virtual, meaning no dynamic_cast as string comparison is as fast/faster.
size_t inviwo::DataFormatBase::getComponents | ( | ) | const |
Returns the number of components in the format, 1 to 4.
size_t inviwo::DataFormatBase::getPrecision | ( | ) | const |
Returns number of bits in each component in the format. can be 8, 16, 32 or 64.
size_t inviwo::DataFormatBase::getSizeInBytes | ( | ) | const |
Returns the size of the format in bytes. For all components.