Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::PortTraits< T, typename > Class Template Reference

A traits class for getting the class identifier from a Port. This provides a customization point if one wants to generate the class identifier dynamically, by specializing the traits for your kind of Port: More...

#include <porttraits.h>

Static Public Member Functions

static constexpr std::string_view classIdentifier ()
 

Detailed Description

template<typename T, typename = void>
class inviwo::PortTraits< T, typename >

A traits class for getting the class identifier from a Port. This provides a customization point if one wants to generate the class identifier dynamically, by specializing the traits for your kind of Port:

template <typename T>
struct PortTraits<MyPort<T>> {
static constexpr std::string_view classIdentifier() {
return generateMyPortClassIdentifier<T>();
}
};
A traits class for getting the class identifier from a Port. This provides a customization point if o...
Definition porttraits.h:56

The default behavior returns the static member "classIdentifier";

Member Function Documentation

◆ classIdentifier()

template<typename T , typename = void>
static constexpr std::string_view inviwo::PortTraits< T, typename >::classIdentifier ( )
inlinestaticconstexpr

The Class Identifier has to be globally unique. Use a reverse DNS naming scheme. Example: "org.someorg.myporttype" The default implementation will look for a static std::string 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.


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