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
CzXomlLoad.h
Go to the documentation of this file.
00001 // 
00002 //
00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine
00004 //
00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk
00006 //
00007 // For updates, tutorials and more details check out www.appeasymobile.com
00008 //
00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin.
00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support
00011 //
00012 //
00013 
00014 #if !defined(_CZ_XOML_LOAD_H_)
00015 #define _CZ_XOML_LOAD_H_
00016 
00017 #include "CzString.h"
00018 #include "CzUtil.h"
00019 #include "CzXoml.h"
00020 #include "CzScene.h"
00021 
00022 /**
00023  @class CzXomlLoad
00024 
00025  @brief Utility class to allow loading of XOML files from within another XOML file.
00026 
00027  CzXomlLoad implements the LoadXOML tag, which enables a XOML file to load another XOML file into its heirarchy.
00028 
00029  Loading a XOML file from XOML is incredibly simple:
00030 
00031  @code
00032 <LoadXOML File="UIStyle.xml" />
00033  @endcode
00034 
00035  Or from an action:
00036 
00037  @code
00038 <Action Method="LoadXOML" P1="Scene2.xml" />
00039  @endcode
00040 
00041  */
00042 class CzXomlLoad : public IzXomlResource
00043 {
00044 public:
00045 protected:
00046     // Properties
00047 public:
00048     // Properties end
00049 public:
00050     CzXomlLoad() : IzXomlResource() { setClassType("loadxoml"); }
00051     // Implementation of IzXomlClass interface
00052     int                 LoadFromXoml(IzXomlResource* parebt, bool load_children, CzXmlNode* node);
00053 
00054     static bool         CreateInstance(IzXomlResource* parent, CzScene* scene, CzString* template_name, CzString* parameters);
00055 };
00056 
00057 /**
00058  @class CzXomlLoadCreator
00059 
00060  @brief Creates an instance of CzXomlLoad.
00061 
00062  Used by the XOMl system to create an instance of CzXomlLoad.
00063 
00064  */
00065 class CzXomlLoadCreator : public IzXomlClassCreator
00066 {
00067 public:
00068     CzXomlLoadCreator()
00069     {
00070         setClassName("loadxoml");
00071     }
00072     IzXomlResource* CreateInstance(IzXomlResource* parent)  { return new CzXomlLoad(); }
00073 };
00074 
00075 /// @}
00076 
00077 #endif  // _CZ_XOML_LOAD_H_