Cogs.Core
|
Convenience wrapper for adding attributes during field creation in a type safe manner. More...
#include <Field.h>
Public Member Functions | |
template<typename ClassType , typename FieldType > | |
FieldWrapper (const Name &name, FieldType ClassType::*field) | |
Construct the field wrapper, forwarding arguments to the underlying field. | |
FieldWrapper & | setDefault (U value) |
Convenience method for setting the default value of the field. | |
FieldWrapper & | setRange (U min, U max) |
Convenience method for setting the valid value range of the field. | |
FieldWrapper & | setStep (U step) |
Convenience method for setting the valid value step of the field. | |
Convenience wrapper for adding attributes during field creation in a type safe manner.
T | Field type, used to convert the wrapper back to a field trivially. |
U | Value type, used to provide type safe attribute wrappers. |
|
inline |
Construct the field wrapper, forwarding arguments to the underlying field.
FieldWrapper< T, U > & Cogs::Reflection::FieldWrapper< T, U >::setDefault | ( | U | value | ) |
Convenience method for setting the default value of the field.
Definition at line 35 of file Field.inl.
References Cogs::Reflection::Field::add().
FieldWrapper< T, U > & Cogs::Reflection::FieldWrapper< T, U >::setRange | ( | U | min, |
U | max | ||
) |
Convenience method for setting the valid value range of the field.
Definition at line 43 of file Field.inl.
References Cogs::Reflection::Field::add().
FieldWrapper< T, U > & Cogs::Reflection::FieldWrapper< T, U >::setStep | ( | U | step | ) |
Convenience method for setting the valid value step of the field.
Definition at line 51 of file Field.inl.
References Cogs::Reflection::Field::add().