1.7.2.9
Gameface
cohtml::TypedProperty< ValueType > Class Template Referenceabstract
+ Inheritance diagram for cohtml::TypedProperty< ValueType >:

Public Types

typedef ValueType ValuePassType
 
typedef RemoveConst< ValuePassType >::Type NoConstValuePassType
 

Public Member Functions

 TypedProperty (const char *name, bool isByRef=true)
 
virtual bool ToBoolean (void *object, bool *boolean) const override
 Convert the property value to a boolean. More...
 
virtual bool ToNumber (void *object, float *number) const override
 Convert the property value to a number. More...
 
virtual bool ToString (void *object, char *buffer, size_t *length) const override
 Convert the property value to a string value. More...
 
virtual bool ToColor (void *object, renoir::Color *color) const override
 Convert the property value to a color value. More...
 
virtual bool ToTransformMatrix2D (void *object, float matrix[6]) const override
 Convert the property value to a matrix. More...
 
virtual bool ToArray (Binder *binder, void *object, ArrayInfo *arrayInfo) const override
 Convert the property value to a array type information. More...
 
virtual bool ToPair (Binder *binder, void *object, PairInfo *pairInfo) const override
 Convert the property value to a pair type information. More...
 
virtual bool ToMap (Binder *binder, void *object, MapInfo *mapInfo) const override
 Convert the property value to a map type information. More...
 
virtual bool ToObject (Binder *binder, void *object, ObjectInfo *objInfo) const override
 Convert the property value to a object type information. More...
 
virtual ValuePassType GetValue (void *object) const =0
 
- Public Member Functions inherited from cohtml::Property
 Property (const char *name, bool isByRef=true)
 Create a new property. More...
 
virtual ~Property ()
 
const char * GetName () const
 Get the name of the property. More...
 
bool IsByRef () const
 Can this property be exported By-Ref. Temporaries can not be exported by reference. More...
 
virtual void * Bind (Binder *binder, void *object) const =0
 Expose the property's name and value to a binder. More...
 
virtual void * BindValue (Binder *binder, void *object) const =0
 Expose only the value of the property to a binder. More...
 
virtual void * Read (Binder *binder, void *object) const =0
 Read the value from a binder. More...
 
virtual void * ReadValue (Binder *binder, void *object) const =0
 Read only the value of the property from a binder. More...
 
virtual PropertyClone () const =0
 Clone the property. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cohtml::Property
static void *COHERENT_CDECL operator new (size_t bytes)
 
static void COHERENT_CDECL operator delete (void *memory)
 
static void *COHERENT_CDECL operator new[] (size_t bytes)
 
static void COHERENT_CDECL operator delete[] (void *memory)
 
- Protected Attributes inherited from cohtml::Property
const char * m_Name
 
bool m_IsByRef
 

Member Typedef Documentation

◆ NoConstValuePassType

template<typename ValueType>
typedef RemoveConst<ValuePassType>::Type cohtml::TypedProperty< ValueType >::NoConstValuePassType

◆ ValuePassType

template<typename ValueType>
typedef ValueType cohtml::TypedProperty< ValueType >::ValuePassType

Constructor & Destructor Documentation

◆ TypedProperty()

template<typename ValueType>
cohtml::TypedProperty< ValueType >::TypedProperty ( const char *  name,
bool  isByRef = true 
)
inline

Member Function Documentation

◆ GetValue()

◆ ToArray()

template<typename ValueType>
virtual bool cohtml::TypedProperty< ValueType >::ToArray ( Binder binder,
void *  object,
ArrayInfo arrayInfo 
) const
inlineoverridevirtual

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
Returns
true if conversion is possible and successful

Implements cohtml::Property.

◆ ToBoolean()

template<typename ValueType>
virtual bool cohtml::TypedProperty< ValueType >::ToBoolean ( void *  object,
bool *  boolean 
) const
inlineoverridevirtual

Convert the property value to a boolean.

Parameters
object- object to get the property value from
boolean- where to store the property value
Returns
true if conversion is possible and successful

Implements cohtml::Property.

◆ ToColor()

template<typename ValueType>
virtual bool cohtml::TypedProperty< ValueType >::ToColor ( void *  object,
renoir::Color *  color 
) const
inlineoverridevirtual

Convert the property value to a color value.

Parameters
object- object to get the property value from
color- where to store the property value
Returns
true if conversion is possible and successful

Implements cohtml::Property.

◆ ToMap()

template<typename ValueType>
virtual bool cohtml::TypedProperty< ValueType >::ToMap ( Binder binder,
void *  object,
MapInfo mapInfo 
) const
inlineoverridevirtual

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
Returns
true if conversion is possible and successful

Implements cohtml::Property.

◆ ToNumber()

template<typename ValueType>
virtual bool cohtml::TypedProperty< ValueType >::ToNumber ( void *  object,
float *  number 
) const
inlineoverridevirtual

Convert the property value to a number.

Parameters
object- object to get the property value from
number- where to store the property value
Returns
true if conversion is possible and successful

Implements cohtml::Property.

◆ ToObject()

template<typename ValueType>
virtual bool cohtml::TypedProperty< ValueType >::ToObject ( Binder binder,
void *  object,
ObjectInfo typeInfo 
) const
inlineoverridevirtual

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
Returns
true if conversion is possible and successful

Implements cohtml::Property.

◆ ToPair()

template<typename ValueType>
virtual bool cohtml::TypedProperty< ValueType >::ToPair ( Binder binder,
void *  object,
PairInfo pairInfo 
) const
inlineoverridevirtual

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
Returns
true if conversion is possible and successful

Implements cohtml::Property.

◆ ToString()

template<typename ValueType>
virtual bool cohtml::TypedProperty< ValueType >::ToString ( void *  object,
char *  buffer,
size_t *  length 
) const
inlineoverridevirtual

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
Returns
true if conversion is possible and successful

Implements cohtml::Property.

◆ ToTransformMatrix2D()

template<typename ValueType>
virtual bool cohtml::TypedProperty< ValueType >::ToTransformMatrix2D ( void *  object,
float  matrix[6] 
) const
inlineoverridevirtual

Convert the property value to a matrix.

Parameters
object- object to get the property value from
matrix- where to store the property value
Returns
true if conversion is possible and successful

Implements cohtml::Property.