Represents a property of a type exposed to the scripting. More...
Public Member Functions | |
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 Property * | Clone () const =0 |
Clone the property. More... | |
virtual bool | ToBoolean (void *object, bool *boolean) const =0 |
Convert the property value to a boolean. More... | |
virtual bool | ToNumber (void *object, float *number) const =0 |
Convert the property value to a number. More... | |
virtual bool | ToString (void *object, char *buffer, size_t *length) const =0 |
Convert the property value to a string value. More... | |
virtual bool | ToColor (void *object, renoir::Color *color) const =0 |
Convert the property value to a color value. More... | |
virtual bool | ToTransformMatrix2D (void *object, float matrix[6]) const =0 |
Convert the property value to a matrix. More... | |
virtual bool | ToArray (Binder *binder, void *object, ArrayInfo *arrayInfo) const =0 |
Convert the property value to a array type information. More... | |
virtual bool | ToPair (Binder *binder, void *object, PairInfo *pairInfo) const =0 |
Convert the property value to a pair type information. More... | |
virtual bool | ToMap (Binder *binder, void *object, MapInfo *mapInfo) const =0 |
Convert the property value to a map type information. More... | |
virtual bool | ToObject (Binder *binder, void *object, ObjectInfo *typeInfo) const =0 |
Convert the property value to a object type information. More... | |
Static Public Member Functions | |
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 | |
const char * | m_Name |
bool | m_IsByRef |
Represents a property of a type exposed to the scripting.
|
inline |
Create a new property.
name | - name of the property. This name will be used in the scripting |
isByRef | - whether this property can be exposed ByRef to the scripting |
cohtml::IViewListener::OnBindingsReleased
is called.
|
inlinevirtual |
|
pure virtual |
Expose the property's name and value to a binder.
binder | - the binder to use |
object | - object to get the property value from |
Implemented in cohtml::AdjustPointer, cohtml::ConcretePropertyReadOnly< Getter >, cohtml::ConcreteProperty< Getter, Setter >, cohtml::FieldProperty< PropertyType(Class::*)[ArraySize]>, and cohtml::FieldProperty< PropertyType(Class::*)>.
|
pure virtual |
Expose only the value of the property to a binder.
binder | - the binder to use |
object | - object to get the property value from |
Implemented in cohtml::AdjustPointer, cohtml::ConcretePropertyReadOnly< Getter >, cohtml::ConcreteProperty< Getter, Setter >, cohtml::FieldProperty< PropertyType(Class::*)[ArraySize]>, and cohtml::FieldProperty< PropertyType(Class::*)>.
|
pure virtual |
Clone the property.
Implemented in cohtml::AdjustPointer, cohtml::ConcretePropertyReadOnly< Getter >, cohtml::ConcreteProperty< Getter, Setter >, cohtml::FieldProperty< PropertyType(Class::*)[ArraySize]>, and cohtml::FieldProperty< PropertyType(Class::*)>.
|
inline |
Get the name of the property.
|
inline |
Can this property be exported By-Ref. Temporaries can not be exported by reference.
|
static |
|
static |
|
static |
|
static |
|
pure virtual |
Read the value from a binder.
binder | - the binder to use |
object | - the object to set the property into |
Implemented in cohtml::AdjustPointer, cohtml::ConcretePropertyReadOnly< Getter >, cohtml::ConcreteProperty< Getter, Setter >, cohtml::FieldProperty< PropertyType(Class::*)[ArraySize]>, and cohtml::FieldProperty< PropertyType(Class::*)>.
|
pure virtual |
Read only the value of the property from a binder.
binder | - the binder to use |
object | - the object to set the property into |
Implemented in cohtml::AdjustPointer, cohtml::ConcretePropertyReadOnly< Getter >, cohtml::ConcreteProperty< Getter, Setter >, cohtml::FieldProperty< PropertyType(Class::*)[ArraySize]>, and cohtml::FieldProperty< PropertyType(Class::*)>.
|
pure virtual |
Convert the property value to a array type information.
binder | - the binder to use |
object | - object to get the property value from |
arrayInfo | - information about array type - callbacks, properties, methods |
Implemented in cohtml::AdjustPointer, cohtml::TypedProperty< ValueType >, cohtml::TypedProperty< const PropertyType(&)[ArraySize]>, cohtml::TypedProperty< ReturnsByRef< Getter >::ValuePassType >, and cohtml::TypedProperty< const PropertyType &>.
|
pure virtual |
Convert the property value to a boolean.
object | - object to get the property value from |
boolean | - where to store the property value |
Implemented in cohtml::AdjustPointer, cohtml::TypedProperty< ValueType >, cohtml::TypedProperty< const PropertyType(&)[ArraySize]>, cohtml::TypedProperty< ReturnsByRef< Getter >::ValuePassType >, and cohtml::TypedProperty< const PropertyType &>.
|
pure virtual |
Convert the property value to a color value.
object | - object to get the property value from |
color | - where to store the property value |
Implemented in cohtml::AdjustPointer, cohtml::TypedProperty< ValueType >, cohtml::TypedProperty< const PropertyType(&)[ArraySize]>, cohtml::TypedProperty< ReturnsByRef< Getter >::ValuePassType >, and cohtml::TypedProperty< const PropertyType &>.
|
pure virtual |
Convert the property value to a map type information.
binder | - the binder to use |
object | - object to get the property value from |
mapInfo | - information about map type - callbacks, properties, methods |
Implemented in cohtml::AdjustPointer, cohtml::TypedProperty< ValueType >, cohtml::TypedProperty< const PropertyType(&)[ArraySize]>, cohtml::TypedProperty< ReturnsByRef< Getter >::ValuePassType >, and cohtml::TypedProperty< const PropertyType &>.
|
pure virtual |
Convert the property value to a number.
object | - object to get the property value from |
number | - where to store the property value |
Implemented in cohtml::AdjustPointer, cohtml::TypedProperty< ValueType >, cohtml::TypedProperty< const PropertyType(&)[ArraySize]>, cohtml::TypedProperty< ReturnsByRef< Getter >::ValuePassType >, and cohtml::TypedProperty< const PropertyType &>.
|
pure virtual |
Convert the property value to a object type information.
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 |
Implemented in cohtml::AdjustPointer, cohtml::TypedProperty< ValueType >, cohtml::TypedProperty< const PropertyType(&)[ArraySize]>, cohtml::TypedProperty< ReturnsByRef< Getter >::ValuePassType >, and cohtml::TypedProperty< const PropertyType &>.
|
pure virtual |
Convert the property value to a pair type information.
binder | - the binder to use |
object | - object to get the property value from |
pairInfo | - information about pair type - callbacks, properties, methods |
Implemented in cohtml::AdjustPointer, cohtml::TypedProperty< ValueType >, cohtml::TypedProperty< const PropertyType(&)[ArraySize]>, cohtml::TypedProperty< ReturnsByRef< Getter >::ValuePassType >, and cohtml::TypedProperty< const PropertyType &>.
|
pure virtual |
Convert the property value to a string value.
object | - object to get the property value from |
buffer | - char buffer for the value |
length | - where to store the length of the converted value |
Implemented in cohtml::AdjustPointer, cohtml::TypedProperty< ValueType >, cohtml::TypedProperty< const PropertyType(&)[ArraySize]>, cohtml::TypedProperty< ReturnsByRef< Getter >::ValuePassType >, and cohtml::TypedProperty< const PropertyType &>.
|
pure virtual |
Convert the property value to a matrix.
object | - object to get the property value from |
matrix | - where to store the property value |
Implemented in cohtml::AdjustPointer, cohtml::TypedProperty< ValueType >, cohtml::TypedProperty< const PropertyType(&)[ArraySize]>, cohtml::TypedProperty< ReturnsByRef< Getter >::ValuePassType >, and cohtml::TypedProperty< const PropertyType &>.
|
protected |
|
protected |