1.14.0.5
Hummingbird
A modern user interface library for games
cohtml::TypeDescription Class Reference

Helper class for describing types. More...

Public Member Functions

template<typename Base >
TypeDescriptionBaseClass (Base *object)
 Bind a base class. More...
 
template<typename Base >
TypeDescriptionBaseClass (const Base *object)
 Bind a base class. More...
 
template<typename Member >
TypeDescriptionProperty (const char *name, Member member)
 Bind a member property. More...
 
template<typename Getter , typename Setter >
TypeDescriptionProperty (const char *name, Getter getter, Setter setter)
 Bind a member property. More...
 
template<typename Getter >
TypeDescriptionPropertyReadOnly (const char *name, Getter getter)
 Bind a read-only member property. More...
 

Detailed Description

Helper class for describing types.

Member Function Documentation

◆ BaseClass() [1/2]

template<typename Base >
TypeDescription& cohtml::TypeDescription::BaseClass ( Base *  object)
inline

Bind a base class.

Parameters
objectpointer to the base part of the object
Returns
reference to the same object to allow chaining calls

◆ BaseClass() [2/2]

template<typename Base >
TypeDescription& cohtml::TypeDescription::BaseClass ( const Base *  object)
inline

Bind a base class.

Parameters
objectpointer to the base part of the object
Returns
reference to the same object to allow chaining calls

◆ Property() [1/2]

template<typename Member >
TypeDescription & cohtml::TypeDescription::Property ( const char *  name,
Member  member 
)

Bind a member property.

Parameters
namename of the property (this string is NOT copied and must be alive till the view is closed)
memberpointer to member of the class that the property represents
Returns
reference to the same object to allow chaining calls

◆ Property() [2/2]

template<typename Getter , typename Setter >
TypeDescription & cohtml::TypeDescription::Property ( const char *  name,
Getter  getter,
Setter  setter 
)

Bind a member property.

Parameters
namename of the property (this string is NOT copied and must be alive till the view is closed)
getterpointer to getter method of the class that the property represents
setterpointer to setter method of the class that the property represents
Returns
reference to the same object to allow chaining calls

◆ PropertyReadOnly()

template<typename Getter >
TypeDescription & cohtml::TypeDescription::PropertyReadOnly ( const char *  name,
Getter  getter 
)

Bind a read-only member property.

Parameters
namename of the property (this string is NOT copied and must be alive till the view is closed)
getterpointer to getter method of the class that the property represents
Returns
reference to the same object to allow chaining calls