Cogs.Foundation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Cogs::ComponentModel::RangeAttribute< T > Struct Template Reference

Adds range information to an object. More...

#include <Attributes.h>

Inheritance diagram for Cogs::ComponentModel::RangeAttribute< T >:
Cogs::Reflection::GenericAttribute< RangeAttribute, T > Cogs::Reflection::Attribute

Public Member Functions

 RangeAttribute (T min, T max)
 Constructs a range attribute with the given bounds.
 
T getMin () const
 Get the minimum value of the range.
 
T getMax () const
 Get the maximum value of the range.
 
- Public Member Functions inherited from Cogs::Reflection::GenericAttribute< RangeAttribute, T >
 GenericAttribute (bool runtime=true)
 Construct a generic attribute. True if runtime attribute.
 
- Public Member Functions inherited from Cogs::Reflection::Attribute
TypeId getType () const
 Get the type of the derived attribute class.
 
TypeId getGenericType () const
 
bool isRuntime () const
 Gets value of the runtime attribute flag.
 

Additional Inherited Members

- Protected Member Functions inherited from Cogs::Reflection::Attribute
 Attribute (TypeId type)
 Constructs an attribute instance with the given type.
 
 Attribute (TypeId type, TypeId genericType, bool runtime=true)
 Constructs a generic attribute instance with the given type and generic type parameter.
 
template<typename T >
Tget (size_t index=0)
 Get the stored value of the given type, with an optional index.
 
template<typename T >
const Tget (size_t index=0) const
 See non-const get() implementation.
 

Detailed Description

template<typename T>
struct Cogs::ComponentModel::RangeAttribute< T >

Adds range information to an object.

Template Parameters
TType of the range values (e.g int, float, vec3 etc.).

Constructor & Destructor Documentation

◆ RangeAttribute()

template<typename T >
Cogs::ComponentModel::RangeAttribute< T >::RangeAttribute ( T  min,
T  max 
)
inline

Constructs a range attribute with the given bounds.

Parameters
minMinimum value.
maxMaximum value.

Member Function Documentation

◆ getMax()

template<typename T >
T Cogs::ComponentModel::RangeAttribute< T >::getMax ( ) const
inline

Get the maximum value of the range.

◆ getMin()

template<typename T >
T Cogs::ComponentModel::RangeAttribute< T >::getMin ( ) const
inline

Get the minimum value of the range.


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