AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzUserPropertyList Class Reference

A user property list. More...

#include <CzUserProperty.h>

Inheritance diagram for CzUserPropertyList:
IzXomlResource

List of all members.

Public Member Functions

 CzUserPropertyList ()
 ~CzUserPropertyList ()
bool addProperty (CzXomlNamedProperty *prop)
 Adds a property to a property list.
void removeProperty (CzXomlNamedProperty *prop, bool destroy=true)
 Removes the property described by prop from the property list.
void clearProperties (bool destroy=true)
 Clears the properties.
CzXomlNamedPropertyfindProperty (unsigned int name_hash)
 Searches the properties list for the named property.
CzXomlNamedPropertyfindProperty (const char *name)
 Searches the properties list for the named property.
bool setProperty (const char *name, const CzString &data, bool delta)
 Sets the named property.
bool setProperty (unsigned int name_hash, const CzString &data, bool delta)
 Sets the named property.
bool setPropertyToVariable (unsigned int name_hash, CzXomlVariable &var)
 Copies the value of the property to a variable.
int LoadFromXoml (IzXomlResource *parent, bool load_children, CzXmlNode *node)
 Creates an instance of this class from XOML.

Protected Attributes

CzList< CzXomlNamedProperty * > Properties

Detailed Description

A user property list.

Property lists can be added to scenes and actors to provide a mechanism for users to track and modify their own properties


Constructor & Destructor Documentation


Member Function Documentation

Adds a property to a property list.

Parameters:
[in]propIf non-null, the property.
Returns:
true if it succeeds, false if it fails.
void CzUserPropertyList::clearProperties ( bool  destroy = true)

Clears the properties.

Parameters:
destroytrue to destroy all properties.

Searches the properties list for the named property.

Parameters:
name_hashThe propery name as a string hash.
Returns:
null if it fails, else the found property.

Searches the properties list for the named property.

Parameters:
nameThe property name.
Returns:
null if it fails, else the found property.
int CzUserPropertyList::LoadFromXoml ( IzXomlResource parent,
bool  load_children,
CzXmlNode node 
) [virtual]

Creates an instance of this class from XOML.

LoadFromXoml is the main method used by all classes that can be instantiated from XOML mark-up. This method creates an instance of this class from the supplied XML node structure specified by node.

Parameters:
[in]parentIf non-null, the parent.
load_childrentrue to load child nodes.
[in]nodeIf non-null, the XOML markup node that defines this object
Returns:
nergative value for error. if 0 then processing of further XOML will stop.

Implements IzXomlResource.

void CzUserPropertyList::removeProperty ( CzXomlNamedProperty prop,
bool  destroy = true 
)

Removes the property described by prop from the property list.

Parameters:
[in]propIf non-null, the property.
destroytrue to destroy property.
bool CzUserPropertyList::setProperty ( const char *  name,
const CzString data,
bool  delta 
)

Sets the named property.

Parameters:
nameThe name of the property.
dataThe data to assign to the property.
deltatrue to add value nistead of set.
Returns:
true if it succeeds, false if it fails.
bool CzUserPropertyList::setProperty ( unsigned int  name_hash,
const CzString data,
bool  delta 
)

Sets the named property.

Parameters:
name_hashThe name of the property as a string hash.
dataThe data to assign to the property.
deltatrue to add value nistead of set.
Returns:
true if it succeeds, false if it fails.
bool CzUserPropertyList::setPropertyToVariable ( unsigned int  name_hash,
CzXomlVariable var 
)

Copies the value of the property to a variable.

Parameters:
name_hashThe property name as a string hash.
[out]varThe target variable.
Returns:
true if it succeeds, false if it fails.

Member Data Documentation


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