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
CzXoml Class Reference

The main controller responsible for instantiating objects from XOML based files. More...

#include <CzXoml.h>

List of all members.

Public Types

typedef CzList
< IzXomlClassCreator * >
::iterator 
_Iterator
typedef CzList< IzXomlAction * >
::iterator 
_ActionsIterator

Public Member Functions

_Iterator begin ()
_Iterator end ()
_ActionsIterator actions_begin ()
_ActionsIterator actions_end ()
void addClass (IzXomlClassCreator *creator)
void addAction (IzXomlAction *action)
IzXomlClassCreatorfindClass (unsigned int name_hash)
 Searches the XOML system for the named class.
IzXomlClassCreatorfindClass (const char *name)
 Searches the XOML system for the named class.
IzXomlActionfindAction (unsigned int name_hash)
 Searches the XOML action system for the named XOML action.
IzXomlActionfindAction (const char *name)
 Searches the XOML action system for the named XOML action.
void Init ()
 Initialises the XOML system.
void Release ()
 Releases the XOML system.
bool Process (IzXomlResource *parent, const char *filename, bool reset_xml_pools=true)
 Loads and processes the supplied XOML file.
bool Process (IzXomlResource *parent, CzXmlNode *node)
 Processes the supplied XOML node tree.
IzXomlResourceProcessNode (IzXomlResource *parent, CzXmlNode *node)
 Processes the supplied XOML node tree.

Static Public Member Functions

static void ApplyStyle (CzStyle *style, CzXmlNode *node)
 Applies a style to the node.

Static Public Attributes

static const char * DockingNames []
static const char * AspectLockNames []
static const char * AlphaModeNames []
static const char * AlignHNames []
static const char * AlignVNames []
static const char * SelectTypeNames []
static const char * AxisNames []
static const char * OrientationNames []
static const char * InputTypeHintNames []

Protected Attributes

CzList< IzXomlClassCreator * > ClassCreators
CzList< IzXomlAction * > Actions

Detailed Description

The main controller responsible for instantiating objects from XOML based files.

CzXoml is the mother of the XOML system and is responsible for the following:

  • Loading and parsing XOML files
  • Instantiating objects from XOML
  • Managing XOML classes
  • Managing XOML actions

Member Typedef Documentation


Member Function Documentation

void CzXoml::addAction ( IzXomlAction action) [inline]
void CzXoml::addClass ( IzXomlClassCreator creator) [inline]
void CzXoml::ApplyStyle ( CzStyle style,
CzXmlNode node 
) [static]

Applies a style to the node.

Applies a sets of style attributes to an XML node. Used by the styling system to modify XOML tags.

Parameters:
[in,out]styleIf non-null, the style.
[in,out]nodeIf non-null, the node.
_Iterator CzXoml::begin ( ) [inline]
_Iterator CzXoml::end ( ) [inline]
IzXomlAction * CzXoml::findAction ( unsigned int  name_hash)

Searches the XOML action system for the named XOML action.

Parameters:
name_hashThe action name as a string hash.
Returns:
null if it fails, else the found action.
IzXomlAction * CzXoml::findAction ( const char *  name)

Searches the XOML action system for the named XOML action.

Parameters:
nameThe action name.
Returns:
null if it fails, else the found action.
IzXomlClassCreator * CzXoml::findClass ( unsigned int  name_hash)

Searches the XOML system for the named class.

Parameters:
name_hashThe class name as a string hash.
Returns:
null if it fails, else the found class.
IzXomlClassCreator * CzXoml::findClass ( const char *  name)

Searches the XOML system for the named class.

Parameters:
name_hashThe class name.
Returns:
null if it fails, else the found class.
void CzXoml::Init ( )

Initialises the XOML system.

Initialises the XOML system, this includes:

  • Adding all of the XOML class creators to XOML for each of the classes that should be available in XOML
  • Adding all of the XOML action methods to XOML that should be available to be called from actions.
  • Adding all of the XOML modifiers that should be made available to scenes and actions.
bool CzXoml::Process ( IzXomlResource parent,
const char *  filename,
bool  reset_xml_pools = true 
)

Loads and processes the supplied XOML file.

Parameters:
[in,out]parentIf non-null, the parent.
filenameFilename of the file.
reset_xml_poolstrue to reset XML pools (unused).
Returns:
true if it succeeds, false if it fails.
bool CzXoml::Process ( IzXomlResource parent,
CzXmlNode node 
)

Processes the supplied XOML node tree.

Walks the supplied XOML tree defined by node (the trees root node) instantiating all valid XOML tags that are found.

Parameters:
[in,out]parentIf non-null, the parent.
[in,out]nodeIf non-null, the root node.
Returns:
true if it succeeds, false if it fails.

Processes the supplied XOML node tree.

Walks the supplied XOML tree defined by node (the trees root node) instantiating all valid XOML tags that are found.

Parameters:
[in,out]parentIf non-null, the parent.
[in,out]nodeIf non-null, the root node.
Returns:
true if it succeeds, false if it fails.
void CzXoml::Release ( )

Releases the XOML system.

Releases teh XOML system but does not delete it.


Member Data Documentation

const char * CzXoml::AlignHNames [static]
Initial value:
 
{
    "left", 
    "centre", 
    "right", 
}
const char * CzXoml::AlignVNames [static]
Initial value:
 
{
    "top", 
    "middle", 
    "bottom", 
}
const char * CzXoml::AlphaModeNames [static]
Initial value:
 
{
    "none", 
    "half", 
    "add", 
    "sub", 
    "blend", 
}
const char * CzXoml::AspectLockNames [static]
Initial value:
 
{
    "none", 
    "x", 
    "y", 
}
const char * CzXoml::AxisNames [static]
Initial value:
 
{
    "none", 
    "x", 
    "y", 
    "xy", 
}
const char * CzXoml::DockingNames [static]
Initial value:
 
{
    "none", 
    "top", 
    "bottom", 
    "left", 
    "right", 
    "topleft", 
    "topright", 
    "bottomleft", 
    "bottomright", 
}
const char * CzXoml::InputTypeHintNames [static]
Initial value:
 
{
    "text", 
    "number", 
    "password", 
    "email", 
    "url", 
}
const char * CzXoml::OrientationNames [static]
Initial value:
 
{
    "horizontal", 
    "vertical", 
}
const char * CzXoml::SelectTypeNames [static]
Initial value:
 
{
    "normal", 
    "toggle", 
    "sticky", 
}

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