cohtml::TypedProperty
#include <Property.h>
Inherits from cohtml::Property
Public Types
Name | |
---|---|
typedef ValueType | ValuePassType |
typedef RemoveConst< ValuePassType >::Type | NoConstValuePassType |
Public Functions
Name | |
---|---|
TypedProperty(const char * name, bool isByRef =true) | |
virtual bool | ToBoolean(void * object, bool * boolean) const override Convert the property value to a boolean. |
virtual bool | ToNumber(void * object, float * number) const override Convert the property value to a number. |
virtual bool | ToString(void * object, char * buffer, size_t * length) const override Convert the property value to a string value. |
virtual bool | ToColor(void * object, renoir::Color * color) const override Convert the property value to a color value. |
virtual bool | ToTransformMatrix2D(void * object, float matrix[6]) const override Convert the property value to a matrix. |
virtual bool | ToArray(Binder * binder, void * object, ArrayInfo * arrayInfo) const override Convert the property value to a array type information. |
virtual bool | ToPair(Binder * binder, void * object, PairInfo * pairInfo) const override Convert the property value to a pair type information. |
virtual bool | ToMap(Binder * binder, void * object, MapInfo * mapInfo) const override Convert the property value to a map type information. |
virtual bool | ToObject(Binder * binder, void * object, ObjectInfo * typeInfo) const override Convert the property value to a object type information. |
virtual ValuePassType | GetValue(void * object) const =0 |
Additional inherited members
Public Functions inherited from cohtml::Property
Name | |
---|---|
Property(const char * name, bool isByRef =true) Create a new property. | |
virtual | ~Property() |
const char * | GetName() const Get the name of the property. |
bool | IsByRef() const Can this property be exported By-Ref. Temporaries can not be exported by reference. |
virtual void * | Bind(Binder * binder, void * object) const =0 Expose the property’s name and value to a binder. |
virtual void * | BindValue(Binder * binder, void * object) const =0 Expose only the value of the property to a binder. |
virtual void * | Read(Binder * binder, void * object) const =0 Read the value from a binder. |
virtual void * | ReadValue(Binder * binder, void * object) const =0 Read only the value of the property from a binder. |
virtual Property * | Clone() const =0 Clone the property. |
void *COHERENT_CDECL | operator new(size_t bytes) |
void COHERENT_CDECL | operator delete(void * memory) |
void *COHERENT_CDECL | operator new[](size_t bytes) |
void COHERENT_CDECL | operator delete[](void * memory) |
Protected Attributes inherited from cohtml::Property
Name | |
---|---|
const char * | m_Name |
bool | m_IsByRef |
Detailed Description
template <typename ValueType>
class cohtml::TypedProperty;
Public Types Documentation
typedef ValuePassType
typedef ValueType cohtml::TypedProperty< ValueType >::ValuePassType;
typedef NoConstValuePassType
typedef RemoveConst<ValuePassType>::Type cohtml::TypedProperty< ValueType >::NoConstValuePassType;
Public Functions Documentation
function TypedProperty
inline TypedProperty(
const char * name,
bool isByRef =true
)
function ToBoolean
inline virtual bool ToBoolean(
void * object,
bool * boolean
) const override
Convert the property value to a boolean.
Parameters:
- object - object to get the property value from
- boolean - where to store the property value
Return: true if conversion is possible and successful
Reimplements: cohtml::Property::ToBoolean
function ToNumber
inline virtual bool ToNumber(
void * object,
float * number
) const override
Convert the property value to a number.
Parameters:
- object - object to get the property value from
- number - where to store the property value
Return: true if conversion is possible and successful
Reimplements: cohtml::Property::ToNumber
function ToString
inline virtual bool ToString(
void * object,
char * buffer,
size_t * length
) const override
Convert the property value to a string value.
Parameters:
- object - object to get the property value from
- buffer - char buffer for the value
- length - where to store the length of the converted value
Return: true if conversion is possible and successful
Reimplements: cohtml::Property::ToString
function ToColor
inline virtual bool ToColor(
void * object,
renoir::Color * color
) const override
Convert the property value to a color value.
Parameters:
- object - object to get the property value from
- color - where to store the property value
Return: true if conversion is possible and successful
Reimplements: cohtml::Property::ToColor
function ToTransformMatrix2D
inline virtual bool ToTransformMatrix2D(
void * object,
float matrix[6]
) const override
Convert the property value to a matrix.
Parameters:
- object - object to get the property value from
- matrix - where to store the property value
Return: true if conversion is possible and successful
Reimplements: cohtml::Property::ToTransformMatrix2D
function ToArray
inline virtual bool ToArray(
Binder * binder,
void * object,
ArrayInfo * arrayInfo
) const override
Convert the property value to a array type information.
Parameters:
- binder - the binder to use
- object - object to get the property value from
- arrayInfo - information about array type - callbacks, properties, methods
Return: true if conversion is possible and successful
Reimplements: cohtml::Property::ToArray
function ToPair
inline virtual bool ToPair(
Binder * binder,
void * object,
PairInfo * pairInfo
) const override
Convert the property value to a pair type information.
Parameters:
- binder - the binder to use
- object - object to get the property value from
- pairInfo - information about pair type - callbacks, properties, methods
Return: true if conversion is possible and successful
Reimplements: cohtml::Property::ToPair
function ToMap
inline virtual bool ToMap(
Binder * binder,
void * object,
MapInfo * mapInfo
) const override
Convert the property value to a map type information.
Parameters:
- binder - the binder to use
- object - object to get the property value from
- mapInfo - information about map type - callbacks, properties, methods
Return: true if conversion is possible and successful
Reimplements: cohtml::Property::ToMap
function ToObject
inline virtual bool ToObject(
Binder * binder,
void * object,
ObjectInfo * typeInfo
) const override
Convert the property value to a object type information.
Parameters:
- binder - the binder to use
- object - object to get the property value from
- typeInfo - information about object type - properties and methods if it’s user defined type
Return: true if conversion is possible and successful
Reimplements: cohtml::Property::ToObject
function GetValue
virtual ValuePassType GetValue(
void * object
) const =0
Reimplemented by: cohtml::FieldProperty< PropertyType(Class::*)>::GetValue, cohtml::FieldProperty< PropertyType(Class::*)[ArraySize]>::GetValue, cohtml::ConcreteProperty::GetValue, cohtml::ConcretePropertyReadOnly::GetValue