cohtml::TypeDescription
On this page
Helper class for describing types.
#include <Binder.h>
Public Functions
Name | |
---|---|
TypeDescription(Binder * binder, void * object) | |
TypeDescription(const TypeDescription & ) | |
~TypeDescription() | |
template <typename Base > TypeDescription & | BaseClass(Base * object) Bind a base class. Refers to CoherentBind of the base class but ignores the base TypeDescription and adds properties to the derived TypeDescription. All BaseClass calls in CoherentBind functions up the chain add properties to the derived TypeDescription as well. |
template <typename Base > TypeDescription & | BaseClass(const Base * object) Bind a base class. |
template <typename Member > TypeDescription & | Property(const char * name, Member member) Bind a member property. |
template <typename Getter ,typename Setter > TypeDescription & | Property(const char * name, Getter getter, Setter setter) Bind a member property. |
template <typename Getter > TypeDescription & | PropertyReadOnly(const char * name, Getter getter) Bind a read-only member property. |
template <typename MethodType > TypeDescription & | Method(const char * name, MethodType method) |
operator SafeBoolType() const |
Public Functions Documentation
function TypeDescription
TypeDescription(
Binder * binder,
void * object
)
function TypeDescription
TypeDescription(
const TypeDescription &
)
function ~TypeDescription
~TypeDescription()
function BaseClass
template <typename Base >
inline TypeDescription & BaseClass(
Base * object
)
Bind a base class. Refers to CoherentBind of the base class but ignores the base TypeDescription and adds properties to the derived TypeDescription. All BaseClass calls in CoherentBind functions up the chain add properties to the derived TypeDescription as well.
Parameters:
- object pointer to the base part of the object
Return: reference to the same object to allow chaining calls
function BaseClass
template <typename Base >
inline TypeDescription & BaseClass(
const Base * object
)
Bind a base class.
Parameters:
- object pointer to the base part of the object
Return: reference to the same object to allow chaining calls
function Property
template <typename Member >
TypeDescription & Property(
const char * name,
Member member
)
Bind a member property.
Parameters:
- name name of the property (this string is NOT copied and must be alive till the view is closed)
- member pointer to member of the class that the property represents
Return: reference to the same object to allow chaining calls
function Property
template <typename Getter ,
typename Setter >
TypeDescription & Property(
const char * name,
Getter getter,
Setter setter
)
Bind a member property.
Parameters:
- name name of the property (this string is NOT copied and must be alive till the view is closed)
- getter pointer to getter method of the class that the property represents
- setter pointer to setter method of the class that the property represents
Return: reference to the same object to allow chaining calls
function PropertyReadOnly
template <typename Getter >
TypeDescription & PropertyReadOnly(
const char * name,
Getter getter
)
Bind a read-only member property.
Parameters:
- name name of the property (this string is NOT copied and must be alive till the view is closed)
- getter pointer to getter method of the class that the property represents
Return: reference to the same object to allow chaining calls
function Method
template <typename MethodType >
TypeDescription & Method(
const char * name,
MethodType method
)
function operator SafeBoolType
inline operator SafeBoolType() const