| Linderdaum Engine: clArrayProperty Class Reference | ![]() |
#include <Property.h>
Public Member Functions | |
| clArrayProperty () | |
| virtual | ~clArrayProperty () |
| virtual bool | Load (iObject *TheObject, mlNode *Node) const |
| Load all items into the array. | |
| virtual noexport bool | Save (iObject *TheObject, mlNode **Node) const |
| Save all items from the array. | |
| virtual bool | IsArray () const |
| Return 'true' if this property is an array. | |
| virtual bool | IsDefaultValue (iObject *Obj) const |
| Return 'true' if current value of the property was not changed from the initial value. | |
Public Attributes | |
| ItemSaveFunction_t | FItemSaver |
| ItemLoadFunction_t | FItemLoader |
| ArraySizeFunction_t | FSizeFunction |
| ArrayResizeFunction_t | FResizeFunction |
| ArrayClearFunction_t | FClearFunction |
| ArrayDeleteFunction_t | FDeleteFunction |
Array property
This property is a 'reference' to some std::vector<> field. To access the vector<> field we should write a specialized routine, which is automatically generated for each property.
class SomeClass { vector<Type> ArrayPropName; }
generates a function
void LoadItemFunction_SomeClass_ArrayPropName(iObject* Obj, mlNode* Node, int i) { for an iObject-based Type dynamic_cast<SomeClass*>(Obj)->ArrayPropName[i] = Linker->Load(Node); }
etc.
Such functions are defined using LOAD/SAVE macros from PropertyMacros.h
| clArrayProperty::clArrayProperty | ( | ) | [inline] |
| virtual clArrayProperty::~clArrayProperty | ( | ) | [inline, virtual] |
| virtual bool clArrayProperty::IsArray | ( | ) | const [inline, virtual] |
Return 'true' if this property is an array.
Reimplemented from iProperty.
| bool clArrayProperty::IsDefaultValue | ( | iObject * | Obj | ) | const [virtual] |
Return 'true' if current value of the property was not changed from the initial value.
Reimplemented from iProperty.
Load all items into the array.
Implements iProperty.
Save all items from the array.
Implements iProperty.