Inviwo  0.9.10.1
Inviwo documentation
inviwo::PropertyTraits< T > Class Template Reference

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

#include <property.h>

Static Public Member Functions

static std::string classIdentifier ()
 

Detailed Description

template<typename T>
class inviwo::PropertyTraits< T >

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

template <typename T>
struct PropertyTraits<MyProperty<T>> {
static std::string classIdentifier() {
return generateMyPropertyClassIdentifier<T>();
}
};

The default behavior returns the static member "classIdentifier" or "CLASS_IDENTIFIER";

Member Function Documentation

◆ classIdentifier()

template<typename T >
static std::string inviwo::PropertyTraits< T >::classIdentifier ( )
inlinestatic

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