Defines general useful formats and new data types Non-virtual, meaning no dynamic_cast as string comparison is as fast/faster.
More...
#include <inviwo/core/util/formats.h>
|
|
constexpr | DataFormatBase (DataFormatId type, size_t rank, size_t components, size_t size, double max, double min, double lowest, NumericType nt, std::string_view s) |
| |
| constexpr size_t | getComponents () const |
| |
| constexpr DataFormatId | getId () const |
| |
| constexpr double | getLowest () const |
| |
| constexpr double | getMax () const |
| |
| constexpr double | getMin () const |
| |
| constexpr NumericType | getNumericType () const |
| |
| constexpr size_t | getPrecision () const |
| |
| constexpr size_t | getRank () const |
| |
| constexpr size_t | getSizeInBytes () const |
| |
| constexpr std::string_view | getString () const |
| |
|
|
static constexpr std::optional< DataFormatId > | find (NumericType type, size_t components, size_t precision) |
| |
|
static constexpr std::optional< DataFormatId > | find (NumericType type, size_t components, size_t precision, size_t rank) |
| |
|
static constexpr std::optional< DataFormatId > | find (std::string_view name) |
| |
|
static constexpr const DataFormatBase * | get () |
| |
|
static constexpr const DataFormatBase * | get (DataFormatId id) |
| |
|
static constexpr const DataFormatBase * | get (NumericType type, size_t components, size_t precision) |
| |
|
static constexpr const DataFormatBase * | get (NumericType type, size_t components, size_t precision, size_t rank) |
| |
|
static constexpr const DataFormatBase * | get (std::string_view name) |
| |
|
template<typename T > |
| static constexpr DataFormatId | typeToId () noexcept |
| |
|
|
size_t | components_ |
| |
|
DataFormatId | formatId_ |
| |
|
std::string_view | formatStr_ |
| |
|
double | lowest_ |
| |
|
double | max_ |
| |
|
double | min_ |
| |
|
NumericType | numericType_ |
| |
|
size_t | rank_ |
| |
|
size_t | sizeInBytes_ |
| |
Defines general useful formats and new data types Non-virtual, meaning no dynamic_cast as string comparison is as fast/faster.
◆ getComponents()
| constexpr size_t inviwo::DataFormatBase::getComponents |
( |
| ) |
const |
|
constexpr |
Returns the number of components in the format, 1 to 4.
◆ getId()
| constexpr DataFormatId inviwo::DataFormatBase::getId |
( |
| ) |
const |
|
constexpr |
Returns DataFormatId of the format
- See also
- DataFormatId
◆ getLowest()
| constexpr double inviwo::DataFormatBase::getLowest |
( |
| ) |
const |
|
constexpr |
Returns the lowest value of the format
◆ getMax()
| constexpr double inviwo::DataFormatBase::getMax |
( |
| ) |
const |
|
constexpr |
Returns the maximum value of the format
◆ getMin()
| constexpr double inviwo::DataFormatBase::getMin |
( |
| ) |
const |
|
constexpr |
Returns the minimum value of the format
◆ getNumericType()
| constexpr NumericType inviwo::DataFormatBase::getNumericType |
( |
| ) |
const |
|
constexpr |
Returns numeric type of the format
- See also
- NumericType
◆ getPrecision()
| constexpr size_t inviwo::DataFormatBase::getPrecision |
( |
| ) |
const |
|
constexpr |
Returns number of bits in each component in the format. can be 8, 16, 32 or 64.
◆ getRank()
| constexpr size_t inviwo::DataFormatBase::getRank |
( |
| ) |
const |
|
constexpr |
Returns the rank in the format, 0, 1 or 2.
◆ getSizeInBytes()
| constexpr size_t inviwo::DataFormatBase::getSizeInBytes |
( |
| ) |
const |
|
constexpr |
Returns the size of the format in bytes. For all components.
◆ getString()
| constexpr std::string_view inviwo::DataFormatBase::getString |
( |
| ) |
const |
|
constexpr |
Returns the name of the format
The documentation for this class was generated from the following file:
- include/inviwo/core/util/formats.h