Cogs.Core
Public Member Functions | List of all members
Cogs::ComponentModel::DescriptionAttribute Struct Reference

Adds a description to an object. More...

#include <Attributes.h>

Inheritance diagram for Cogs::ComponentModel::DescriptionAttribute:
Cogs::Reflection::RegularAttribute< DescriptionAttribute > Cogs::Reflection::Attribute

Public Member Functions

 DescriptionAttribute (StringView text)
 Constructs a description from the given text string.
 
const StringViewgetValue () const
 Get the description text string.
 
- Public Member Functions inherited from Cogs::Reflection::RegularAttribute< DescriptionAttribute >
 RegularAttribute (bool runtime=true)
 Construct a regular 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 >
T & get (size_t index=0)
 Get the stored value of the given type, with an optional index.
 
template<typename T >
const T & get (size_t index=0) const
 See non-const get() implementation.
 

Detailed Description

Adds a description to an object.

For code-generation

Definition at line 92 of file Attributes.h.

Constructor & Destructor Documentation

◆ DescriptionAttribute()

Cogs::ComponentModel::DescriptionAttribute::DescriptionAttribute ( StringView  text)
inline

Constructs a description from the given text string.

The string must be alive for the lifetime of the attribute.

Definition at line 100 of file Attributes.h.

Member Function Documentation

◆ getValue()

const StringView & Cogs::ComponentModel::DescriptionAttribute::getValue ( ) const
inline

Get the description text string.

Definition at line 115 of file Attributes.h.


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