3#include "../Reflection/Attributes.h"
7 namespace ComponentModel
24 Reflection::Attribute::get<T>(0) = value;
28 T getValue()
const {
return Reflection::Attribute::get<T>(0); }
47 Reflection::Attribute::get<T>(0) = min;
48 Reflection::Attribute::get<T>(1) = max;
52 T getMin()
const {
return Reflection::Attribute::get<T>(0); }
55 T getMax()
const {
return Reflection::Attribute::get<T>(1); }
73 Reflection::Attribute::get<T>(0) = value;
99#if !defined( EMSCRIPTEN )
103 Attribute::get<StringView>(0) = text;
128template<>
inline Cogs::StringView getName<Cogs::ComponentModel::StepSizeAttribute<float>>() {
return "StepSizeAttribute"; }
129template<>
inline Cogs::StringView getName<Cogs::ComponentModel::RangeAttribute<float>>() {
return "RangeAttribute"; }
130template<>
inline Cogs::StringView getName<Cogs::ComponentModel::RangeAttribute<int>>() {
return "RangeAttribute"; }
131template<>
inline Cogs::StringView getName<Cogs::ComponentModel::RangeAttribute<uint32_t>>() {
return "RangeAttribute"; }
132template<>
inline Cogs::StringView getName<Cogs::ComponentModel::DefaultValueAttribute<float>>() {
return "DefaultValueAttribute"; }
133template<>
inline Cogs::StringView getName<Cogs::ComponentModel::DefaultValueAttribute<uint32_t>>() {
return "DefaultValueAttribute"; }
134template<>
inline Cogs::StringView getName<Cogs::ComponentModel::DefaultValueAttribute<int32_t>>() {
return "DefaultValueAttribute"; }
135template<>
inline Cogs::StringView getName<Cogs::ComponentModel::DefaultValueAttribute<double>>() {
return "DefaultValueAttribute"; }
Cogs::StringView getName< Cogs::ComponentModel::ColorAttribute >()
Definition: Attributes.h:137
Cogs::StringView getName< Cogs::ComponentModel::DescriptionAttribute >()
Definition: Attributes.h:136
Cogs::StringView getName< Cogs::ComponentModel::SerializableAttribute >()
Definition: Attributes.h:138
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Main Cogs namespace.
Definition: MortonCode.h:5
Tags an object as being able to represent a color.
Definition: Attributes.h:122
Adds default value information to an object.
Definition: Attributes.h:16
DefaultValueAttribute(T value)
Constructs a default value attribute from the given value.
Definition: Attributes.h:22
T getValue() const
Get the default value.
Definition: Attributes.h:28
Adds a description to an object.
Definition: Attributes.h:93
DescriptionAttribute(StringView text)
Constructs a description from the given text string.
Definition: Attributes.h:100
const StringView & getValue() const
Get the description text string.
Definition: Attributes.h:115
Adds range information to an object.
Definition: Attributes.h:38
RangeAttribute(T min, T max)
Constructs a range attribute with the given bounds.
Definition: Attributes.h:45
T getMax() const
Get the maximum value of the range.
Definition: Attributes.h:55
T getMin() const
Get the minimum value of the range.
Definition: Attributes.h:52
Tags an object as being possible to serialize.
Definition: Attributes.h:85
Adds step size information to an object.
Definition: Attributes.h:65
T getStepValue() const
Get the Step value.
Definition: Attributes.h:77
StepSizeAttribute(T value)
Constructs a step value attribute from the given value.
Definition: Attributes.h:71
Base attribute type for generic attributes.
Definition: Attributes.h:119
Base attribute type for regular attributes.
Definition: Attributes.h:104
RegularAttribute(bool runtime=true)
Construct a regular attribute. True if runtime attribute.