BVB Source Codes

CRYENGINE Show FlowBaseXmlNode.h Source code

Return Download CRYENGINE: download FlowBaseXmlNode.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  File name:   FlowBaseXmlNode.h
  5. //  Description: Flowgraph nodes to read/write Xml files
  6. // -------------------------------------------------------------------------
  7. //  History:
  8. //    - 8/16/08 : File created - Kevin Kirst
  9. //    - 09/06/2011: Added to SDK - Sascha Hoba
  10. ////////////////////////////////////////////////////////////////////////////
  11.  
  12. #pragma once
  13. #include <CryFlowGraph/IFlowBaseNode.h>
  14.  
  15. #define ADD_BASE_INPUTS() \
  16.   InputPortConfig_Void("Execute", _HELP("Execute Xml instruction"))
  17.  
  18. #define ADD_BASE_OUTPUTS()                                                                        \
  19.   OutputPortConfig<bool>("Success", _HELP("Called if Xml instruction is executed successfully")), \
  20.   OutputPortConfig<bool>("Fail", _HELP("Called if Xml instruction fails")),                       \
  21.   OutputPortConfig<bool>("Done", _HELP("Called when Xml instruction is carried out"))
  22.  
  23. ////////////////////////////////////////////////////
  24. class CFlowXmlNode_Base : public CFlowBaseNode<eNCT_Instanced>
  25. {
  26. public:
  27.         ////////////////////////////////////////////////////
  28.         CFlowXmlNode_Base(SActivationInfo* pActInfo);
  29.         virtual ~CFlowXmlNode_Base(void);
  30.         virtual void ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo);
  31.  
  32. protected:
  33.         enum EInputs
  34.         {
  35.                 EIP_Execute,
  36.                 EIP_CustomStart,
  37.         };
  38.  
  39.         enum EOutputs
  40.         {
  41.                 EOP_Success,
  42.                 EOP_Fail,
  43.                 EOP_Done,
  44.                 EOP_CustomStart,
  45.         };
  46.  
  47.         //! Overload to handle Xml execution
  48.         virtual bool Execute(SActivationInfo* pActInfo) = 0;
  49.  
  50. private:
  51.         SActivationInfo m_actInfo;
  52.         bool            m_initialized;
  53. };
  54.  
  55. ////////////////////////////////////////////////////
  56. ////////////////////////////////////////////////////
  57.  
  58. ////////////////////////////////////////////////////
  59. struct SXmlDocument
  60. {
  61.         XmlNodeRef root;
  62.         XmlNodeRef active;
  63.         size_t     refCount;
  64. };
  65.  
  66. class CGraphDocManager
  67. {
  68. private:
  69.         CGraphDocManager();
  70.         static CGraphDocManager* m_instance;
  71. public:
  72.         virtual ~CGraphDocManager();
  73.         static void              Create();
  74.         static CGraphDocManager* Get();
  75.  
  76.         void                     MakeXmlDocument(IFlowGraph* pGraph);
  77.         void                     DeleteXmlDocument(IFlowGraph* pGraph);
  78.         bool                     GetXmlDocument(IFlowGraph* pGraph, SXmlDocument** document);
  79.  
  80. private:
  81.         typedef std::map<IFlowGraph*, SXmlDocument> GraphDocMap;
  82.         GraphDocMap m_GraphDocMap;
  83. };
  84. extern CGraphDocManager* GDM;
  85.  
downloadFlowBaseXmlNode.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top