VISR  0.11.8
Versatile Interactive Scene Renderer
parameter_type.hpp File Reference
#include "detail/compile_time_hash_fnv1.hpp"
#include <cstddef>

Go to the source code of this file.

Classes

struct  visr::ParameterToId< Parameter >
 
struct  visr::IdToParameter< Id >
 
struct  visr::ParameterToConfigType< Parameter >
 

Namespaces

 visr
 

Macros

#define DEFINE_PARAMETER_TYPE(ParameterClassType, ParameterId, ParameterConfigType)
 

Typedefs

using visr::ParameterType = uint64_t
 

Macro Definition Documentation

#define DEFINE_PARAMETER_TYPE (   ParameterClassType,
  ParameterId,
  ParameterConfigType 
)
Value:
namespace visr { \
template<> \
struct ParameterToId< ParameterClassType > \
{\
public:\
enum : ParameterType { id = ParameterId };\
using ConfigType = ParameterConfigType; \
};\
template<> \
struct IdToParameter< ParameterId > \
{ \
public: \
using Type = ParameterClassType; \
}; \
template<> \
struct ParameterToConfigType< ParameterClassType > \
{\
public:\
using ConfigType = ParameterConfigType;\
}; \
}
uint64_t ParameterType
Definition: parameter_type.hpp:13
Definition: options.cpp:10

Macro to register compile-time translations between the parameter class type, the corresponding type id and the type of the configuration data type.

Parameters
ParameterClassTypeThe type of the parameter class
ParameterIdNumeric parameter id (hash value)
ParameterConfigTypeThe clann type of the configuration type.
Note
The translation is compile-time, so it must be visible (included) at the point of usage.
This registration is independent of the run-time parameter lookup and instantiation performed in ParameterFactory.