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
CzActionsResource.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_ACTIONS_RESOURCE_H_)
00015 #define _CZ_ACTIONS_RESOURCE_H_
00016 
00017 #include "CzActions.h"
00018 #include "CzXoml.h"
00019 
00020 /**
00021  @addtogroup Actions
00022  @{
00023  */
00024  
00025 /**
00026  @class CzXomlActions_Resource
00027 
00028  @brief Implements actions that relate to resources
00029 
00030  The CzXomlActions_Resource class holds Actions (IzXomlAction) that deal with XOML resources such as RemoveResource
00031  
00032  The following actions are supported:
00033  - RemoveResource
00034  - RemoveResources
00035 
00036  The above actions have the following XOML prototypes:
00037  - RemoveResource(resource-name)
00038    - resource-name - Name of the resource to remove and destroy
00039  - RemoveResources(tag-name)
00040    - tag-name - Resource tag name to remove and destory (all resources matching the tag will be removd)
00041 
00042  For more information on resources see IzXomlResource and CzXomlResourceManager
00043  
00044  */
00045  
00046 class CzXomlActions_Resource : public IzXomlAction
00047 {
00048 public:
00049     enum eActionType
00050     {
00051         Action_RemoveResource   = 0, 
00052         Action_RemoveResources  = 1, 
00053         Action_Max              = 2, 
00054     };
00055 protected:
00056     eActionType Type;
00057     CzXomlActions_Resource() {}
00058 public:
00059     CzXomlActions_Resource(eActionType type)
00060     {
00061         Type = type;
00062         switch (Type)
00063         {
00064         case Action_RemoveResource:
00065             setActionName("removeresource");
00066             break;
00067         case Action_RemoveResources:
00068             setActionName("removeresources");
00069             break;
00070         }
00071     }
00072     void Execute(IzXomlResource* source, CzAction* action);
00073 };
00074 
00075 /// @}
00076 
00077 #endif // _CZ_ACTIONS_RESOURCE_H_