Polycode
|
Single entry in an Object. More...
Public Member Functions | |
ObjectEntry () | |
Default constructor. | |
ObjectEntry * | addChild (const String &name) |
Adds an empty child entry. | |
ObjectEntry * | addChild (const String &name, Number val) |
Adds an empty child entry with a number value. | |
ObjectEntry * | addChild (const String &name, int val) |
Adds an empty child entry with an integer value. | |
ObjectEntry * | addChild (const String &name, const String &val) |
Adds an empty child entry with a string value. | |
ObjectEntry * | addChild (const String &name, bool val) |
Adds an empty child entry with a boolean value. | |
ObjectEntry * | operator[] (int index) |
Accesses an object entry as an array by an integer lookup. | |
ObjectEntry * | operator[] (const String &key) |
Accesses an object entry by a string lookup and returns the corresponding object entry. | |
Public Attributes | |
int | type |
Type of entry. | |
String | name |
Lookup key for this object entry. | |
Number | NumberVal |
Number value of this object entry. | |
int | intVal |
Integer value of this object entry. | |
String | stringVal |
String value of this object entry. | |
bool | boolVal |
Boolean value of this object entry. | |
int | length |
Length of this object entry if its type is ARRAY_ENTRY. |
ObjectEntry* Polycode::ObjectEntry::addChild | ( | const String & | name | ) | [inline] |
Adds an empty child entry.
name | Lookup key for the object entry. |
ObjectEntry* Polycode::ObjectEntry::addChild | ( | const String & | name, |
Number | val | ||
) | [inline] |
Adds an empty child entry with a number value.
name | Lookup key for the object entry. |
val | Number to set as value in the object entry. |
ObjectEntry* Polycode::ObjectEntry::addChild | ( | const String & | name, |
int | val | ||
) | [inline] |
Adds an empty child entry with an integer value.
name | Lookup key for the object entry. |
val | Integer to set as value in the object entry. |
ObjectEntry* Polycode::ObjectEntry::addChild | ( | const String & | name, |
const String & | val | ||
) | [inline] |
Adds an empty child entry with a string value.
name | Lookup key for the object entry. |
val | String to set as value in the object entry. |
ObjectEntry* Polycode::ObjectEntry::addChild | ( | const String & | name, |
bool | val | ||
) | [inline] |
Adds an empty child entry with a boolean value.
name | Lookup key for the object entry. |
val | Boolean to set as value in the object entry. |
ObjectEntry* Polycode::ObjectEntry::operator[] | ( | int | index | ) | [inline] |
Accesses an object entry as an array by an integer lookup.
index | Lookup index to return value for. |
ObjectEntry* Polycode::ObjectEntry::operator[] | ( | const String & | key | ) | [inline] |
Accesses an object entry by a string lookup and returns the corresponding object entry.
key | Lookup key to return value for. |
Type of entry.
Possible values are (FLOAT_ENTRY, INT_ENTRY, BOOL_ENTRY, ARRAY_ENTRY, STRING_ENTRY, CONTAINER_ENTRY).