1.7.2.9
Gameface
cohtml::TypeDescription Class Reference

Helper class for describing types. More...

Public Member Functions

 TypeDescription (Binder *binder, void *object)
 
 TypeDescription (const TypeDescription &)
 
 ~TypeDescription ()
 
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...
 
template<typename MethodType >
TypeDescriptionMethod (const char *name, MethodType method)
 
 operator SafeBoolType () const
 

Detailed Description

Helper class for describing types.

Constructor & Destructor Documentation

◆ TypeDescription() [1/2]

cohtml::TypeDescription::TypeDescription ( Binder binder,
void *  object 
)

◆ TypeDescription() [2/2]

cohtml::TypeDescription::TypeDescription ( const TypeDescription )

◆ ~TypeDescription()

cohtml::TypeDescription::~TypeDescription ( )

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

◆ Method()

template<typename MethodType >
TypeDescription & cohtml::TypeDescription::Method ( const char *  name,
MethodType  method 
)

◆ operator SafeBoolType()

cohtml::TypeDescription::operator SafeBoolType ( ) const
inline

◆ 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