Inviwo 0.9.12-pre
Inviwo documentation
 
Loading...
Searching...
No Matches
inviwo::DataTraits< json > Struct 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 json &data)
 
static constexpr std::string_view classIdentifier ()
 
static constexpr std::string_view dataName ()
 
static constexpr uvec3 colorCode ()
 
static Document info (const json &data)
 

Member Function Documentation

◆ classIdentifier()

static constexpr std::string_view inviwo::DataTraits< json, 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< json, 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< json, 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< json, typename >::info ( const json & 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

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