Linderdaum Engine: clArrayProperty Class Reference
Updated: Sun Feb 5 2012 22:59:49
clArrayProperty Class Reference

#include <Property.h>

List of all members.

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

Detailed Description

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


Constructor & Destructor Documentation

clArrayProperty::clArrayProperty ( ) [inline]
virtual clArrayProperty::~clArrayProperty ( ) [inline, virtual]

Member Function Documentation

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.

bool clArrayProperty::Load ( iObject TheObject,
mlNode Node 
) const [virtual]

Load all items into the array.

Implements iProperty.

bool clArrayProperty::Save ( iObject TheObject,
mlNode **  Node 
) const [virtual]

Save all items from the array.

Implements iProperty.


Member Data Documentation


The documentation for this class was generated from the following files: