Linderdaum Engine: clFieldProperty Class Reference
Updated: Sun Feb 5 2012 22:59:50
clFieldProperty Class Reference

#include <Property.h>

List of all members.

Public Member Functions

 clFieldProperty ()
virtual ~clFieldProperty ()
virtual bool Load (iObject *TheObject, mlNode *Node) const
 Load single field of an object.
virtual noexport bool Save (iObject *TheObject, mlNode **Result) const
 Save single field of an object.

Public Attributes

LoadFunction_t FLoadFunction
SaveFunction_t FSaveFunction

Detailed Description

Single field property

Each property is either a reference to a field of an object or a getter/setter pair. Only read/write properties are supported (i.e., a field or both with setter and getter) for serialization.

To access the fields or getters/setters Load and Save function are generated and added to this property description in metaclass registration.

So, a field Field in class SomeClass

class SomeClass { Property(Name = MyProperty, FieldName = Field)

Type Field; };

generates a property description

REGISTER_PROPERTY__FIELD( SomeClass, )

and a pair of loader/saver function

LoadFieldFunction_SomeClass_Field(iObject* Obj, mlNode* Node) { dynamic_cast<SomeClass*>(Obj)->Field = Linker->Load(Node); // or a converion routine instead of Linker::Load, if it is a scalar field }

Loader/Saver functions are defined using macros in PropertyMacros.h End-users of the Linderdaum Runtime should not bother writing these functions - they are automatically generated by the LSDC tool.


Constructor & Destructor Documentation

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

Member Function Documentation

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

Load single field of an object.

Implements iProperty.

bool clFieldProperty::Save ( iObject TheObject,
mlNode **  Result 
) const [virtual]

Save single field of an object.

Implements iProperty.


Member Data Documentation


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