Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::DataFormatBase Class Reference

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>

+ Inheritance diagram for inviwo::DataFormatBase:

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 DataFormatBaseget ()
 
static const DataFormatBaseget (DataFormatId id)
 
static const DataFormatBaseget (std::string_view name)
 
static const DataFormatBaseget (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
 
DataFormatBaseoperator= (const DataFormatBase &)=delete
 
DataFormatBaseoperator= (DataFormatBase &&)=delete
 

Protected Attributes

DataFormatId formatId_
 
size_t components_
 
size_t sizeInBytes_
 
NumericType numericType_
 
double max_
 
double min_
 
double lowest_
 
std::string_view formatStr_
 

Detailed Description

Defines general useful formats and new data types Non-virtual, meaning no dynamic_cast as string comparison is as fast/faster.

Member Function Documentation

◆ getComponents()

size_t inviwo::DataFormatBase::getComponents ( ) const

Returns the number of components in the format, 1 to 4.

◆ getPrecision()

size_t inviwo::DataFormatBase::getPrecision ( ) const

Returns number of bits in each component in the format. can be 8, 16, 32 or 64.

◆ getSizeInBytes()

size_t inviwo::DataFormatBase::getSizeInBytes ( ) const

Returns the size of the format in bytes. For all components.


The documentation for this class was generated from the following file: