#include <vardef.h>
Public Types | |
Public Member Functions | |
bool | asBool () const |
int64 | asInteger () const |
numeric | asNumeric () const |
t_reflection | asReflecMode () const |
uint32 | asReflecOffset () const |
void * | asReflectFuncData () const |
reflectionFunc | asReflectFuncFrom () const |
reflectionFunc | asReflectFuncTo () const |
const String * | asString () const |
Symbol * | asSymbol () const |
bool | isBaseClass () const |
bool | isBool () const |
bool | isInteger () const |
bool | isNil () const |
bool | isNumeric () const |
bool | isReadOnly () const |
bool | isReference () const |
bool | isReflectFunc () const |
bool | isReflective () const |
bool | isString () const |
bool | isSymbol () const |
bool | load (Module *mod, Stream *in) |
bool | save (Stream *out) const |
VarDef & | setBaseClass (Symbol *sym) |
VarDef & | setBool (bool val) |
VarDef & | setInteger (int64 val) |
VarDef & | setNil () |
Describes this property as nil. | |
VarDef & | setNumeric (numeric val) |
VarDef & | setReadOnly (bool ro) |
Describes this property as reflective. | |
VarDef & | setReference (Symbol *sym) |
VarDef & | setReflectFunc (reflectionFunc rfrom, reflectionFunc rto=0, void *reflect_data=0) |
Describes this property as reflective. | |
VarDef & | setReflective (t_reflection mode, void *base, void *position) |
Describes this property as reflective. | |
VarDef & | setReflective (t_reflection mode, uint32 offset) |
Describes this property as reflective. | |
VarDef & | setString (const String *str) |
VarDef & | setSymbol (Symbol *sym) |
t_type | type () const |
VarDef (t_reflection mode, uint32 offset) | |
VarDef (reflectionFunc rfrom, reflectionFunc rto=0) | |
VarDef (t_type t, int64 iv) | |
VarDef (t_type t, Symbol *sym) | |
VarDef (Symbol *sym) | |
VarDef (const String *str) | |
VarDef (numeric val) | |
VarDef (int64 val) | |
VarDef (bool val) | |
VarDef () |
This class holds the immediate values of properties of classes and objects, and eventually the values static symbols, when an initial value has been declared if it's declared. If the properties are declared as expressions, or anyhow not as immediate values, the relative property definition is set to nil and the code generator will create an internal constructor (called before the user-defined constructor) that will initialize the complex property values.
Property definition can then be:
Falcon::VarDef::VarDef | ( | ) | [inline] |
Falcon::VarDef::VarDef | ( | bool | val | ) | [inline, explicit] |
Falcon::VarDef::VarDef | ( | int64 | val | ) | [inline] |
Falcon::VarDef::VarDef | ( | numeric | val | ) | [inline] |
Falcon::VarDef::VarDef | ( | const String * | str | ) | [inline] |
Falcon::VarDef::VarDef | ( | Symbol * | sym | ) | [inline] |
Falcon::VarDef::VarDef | ( | reflectionFunc | rfrom, | |
reflectionFunc | rto = 0 | |||
) | [inline] |
Falcon::VarDef::VarDef | ( | t_reflection | mode, | |
uint32 | offset | |||
) | [inline] |
bool Falcon::VarDef::asBool | ( | ) | const [inline] |
int64 Falcon::VarDef::asInteger | ( | ) | const [inline] |
numeric Falcon::VarDef::asNumeric | ( | ) | const [inline] |
t_reflection Falcon::VarDef::asReflecMode | ( | ) | const [inline] |
uint32 Falcon::VarDef::asReflecOffset | ( | ) | const [inline] |
void* Falcon::VarDef::asReflectFuncData | ( | ) | const [inline] |
reflectionFunc Falcon::VarDef::asReflectFuncFrom | ( | ) | const [inline] |
reflectionFunc Falcon::VarDef::asReflectFuncTo | ( | ) | const [inline] |
const String* Falcon::VarDef::asString | ( | ) | const [inline] |
Symbol* Falcon::VarDef::asSymbol | ( | ) | const [inline] |
bool Falcon::VarDef::isBaseClass | ( | ) | const [inline] |
bool Falcon::VarDef::isBool | ( | ) | const [inline] |
bool Falcon::VarDef::isInteger | ( | ) | const [inline] |
References Falcon::traits::t_int().
bool Falcon::VarDef::isNil | ( | ) | const [inline] |
bool Falcon::VarDef::isNumeric | ( | ) | const [inline] |
bool Falcon::VarDef::isReadOnly | ( | ) | const [inline] |
bool Falcon::VarDef::isReference | ( | ) | const [inline] |
bool Falcon::VarDef::isReflectFunc | ( | ) | const [inline] |
bool Falcon::VarDef::isReflective | ( | ) | const [inline] |
bool Falcon::VarDef::isString | ( | ) | const [inline] |
References Falcon::traits::t_string().
bool Falcon::VarDef::isSymbol | ( | ) | const [inline] |
bool Falcon::VarDef::save | ( | Stream * | out | ) | const |
References Falcon::traits::t_int().
VarDef& Falcon::VarDef::setNil | ( | ) | [inline] |
Describes this property as nil.
VarDef& Falcon::VarDef::setReadOnly | ( | bool | ro | ) | [inline] |
Describes this property as reflective.
VarDef& Falcon::VarDef::setReflectFunc | ( | reflectionFunc | rfrom, | |
reflectionFunc | rto = 0 , |
|||
void * | reflect_data = 0 | |||
) | [inline] |
Describes this property as reflective.
This ValDef defines a property that will have user functions called when the VM wants to set or get a property.
It is also possible to define an extra reflective data, that should be alive during the lifespan of the module defining it, that will be passed back to the property set/get callback functions as the PropEntry::reflect_data property of the "entry" parameter.
rfrom | Function that gets called when the property is set from an external source. | |
rto | Function that gets called when the property is read and then stored to the external source; set to 0 to have a read-only reflective property. | |
reflect_data | a pointer that will be passed as a part of the entry structure in the callback method. |
References val_rfunc.
VarDef& Falcon::VarDef::setReflective | ( | t_reflection | mode, | |
void * | base, | |||
void * | position | |||
) | [inline] |
Describes this property as reflective.
Shortcut calculating the offset given a sample structure and a field in that.
VarDef& Falcon::VarDef::setReflective | ( | t_reflection | mode, | |
uint32 | offset | |||
) | [inline] |
Describes this property as reflective.
References Falcon::traits::t_string().
t_type Falcon::VarDef::type | ( | ) | const [inline] |
void* Falcon::VarDef::data |
Referenced by setBool().
Referenced by setNumeric().
struct { ... } Falcon::VarDef::val_reflect |
struct { ... } Falcon::VarDef::val_rfunc |
Referenced by setReflectFunc().
const String* Falcon::VarDef::val_str |
Referenced by setBaseClass(), setReference(), and setSymbol().