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

Adds default value information to an object. More...

#include <Attributes.h>

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

Public Member Functions

 DefaultValueAttribute (T value)
 Constructs a default value attribute from the given value.
 
T getValue () const
 Get the default value.
 
- Public Member Functions inherited from Cogs::Reflection::GenericAttribute< DefaultValueAttribute, 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::DefaultValueAttribute< T >

Adds default value information to an object.

Template Parameters
Typeof the default value.

Constructor & Destructor Documentation

◆ DefaultValueAttribute()

template<typename T >
Cogs::ComponentModel::DefaultValueAttribute< T >::DefaultValueAttribute ( T  value)
inline

Constructs a default value attribute from the given value.

Parameters
valueDefault value.

Member Function Documentation

◆ getValue()

template<typename T >
T Cogs::ComponentModel::DefaultValueAttribute< T >::getValue ( ) const
inline

Get the default value.


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