Inviwo 0.9.12-pre
Inviwo documentation
 
Loading...
Searching...
No Matches
inviwo::DataTraits< DataSequence< Data > > Struct Template Reference

Static Public Member Functions

static constexpr std::string_view classIdentifier ()
 
static constexpr std::string_view dataName ()
 
static constexpr uvec3 colorCode ()
 
static Document info (const DataSequence< Data > &data)
 
static constexpr std::string_view classIdentifier ()
 
static constexpr std::string_view dataName ()
 
static constexpr uvec3 colorCode ()
 
static Document info (const DataSequence< Data > &data)
 

Static Public Attributes

static constexpr auto cid
 
static constexpr auto name
 

Member Function Documentation

◆ classIdentifier()

static constexpr std::string_view inviwo::DataTraits< DataSequence< Data >, typename >::classIdentifier ( )
inlinestaticconstexpr

The Class Identifier has to be globally unique. Use a reverse DNS naming scheme. Example: "org.someorg.mydatatype" The default implementation will look for a static std::string / std::string_view member T::classIdentifier. In case it is not found an empty string will be returned. An empty class identifier will be considered an error in various factories.

◆ colorCode()

static constexpr uvec3 inviwo::DataTraits< DataSequence< Data >, typename >::colorCode ( )
inlinestaticconstexpr

Should return a color that will be used to identify ports of this data type The default implementation will look for a static uvec3 member T::colorCode. In case it is not found black will be returned.

◆ dataName()

static constexpr std::string_view inviwo::DataTraits< DataSequence< Data >, typename >::dataName ( )
inlinestaticconstexpr

Should return a user friendly version of the above identifier, "MyDataType" for example. Does not have to be unique, and usually shorter then the class identifier. The default implementation will look for a static std::string / std::string_view member T::dataName. In case it is not found the classIdentifier will be returned.

◆ info()

static Document inviwo::DataTraits< DataSequence< Data >, typename >::info ( const DataSequence< Data > & data)
inlinestatic

Should return a document with information describing the data. The default implementation will look for a static function Document T::getInfo(const T& data). In case it is not found a Document only containing the dataName() will be returned.

See also
Document

Member Data Documentation

◆ cid

template<typename Data>
auto inviwo::DataTraits< DataSequence< Data > >::cid
staticconstexpr
Initial value:
= []() {
constexpr auto name = DataTraits<Data>::classIdentifier();
if constexpr (!name.empty()) {
return StaticString<name.size()>(name) + ".sequence";
} else {
return StaticString<0>{};
}
}()
static constexpr std::string_view classIdentifier()
Definition datatraits.h:83
A compile time string implementation. Supports compile time string concatenation and conversion to st...
Definition staticstring.h:73

◆ name

template<typename Data>
auto inviwo::DataTraits< DataSequence< Data > >::name
staticconstexpr
Initial value:
= []() {
constexpr auto tName = DataTraits<Data>::dataName();
if constexpr (!tName.empty()) {
return "DataSequence<" + StaticString<tName.size()>(tName) + ">";
} else {
return StaticString{"DataSequence<?>"};
}
}()
static constexpr std::string_view dataName()
Definition datatraits.h:91

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