BVB Source Codes

CRYENGINE Show SelectionTreeManager.h Source code

Return Download CRYENGINE: download SelectionTreeManager.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef __SelectionTreeManager_h__
  4. #define __SelectionTreeManager_h__
  5.  
  6. #pragma once
  7.  
  8. /*
  9.    This file implements a container and loader for selection trees.
  10.  */
  11.  
  12. #include <CryAISystem/ISelectionTreeManager.h>
  13.  
  14. #include "BlockyXml.h"
  15. #include "SelectionTreeTemplate.h"
  16.  
  17. class CSelectionTreeManager :
  18.         public ISelectionTreeManager
  19. {
  20. public:
  21.         virtual ~CSelectionTreeManager(){}
  22.         virtual void                 Reload();
  23.         void                         ScanFolder(const char* folderName);
  24.  
  25.         void                         Reset();
  26.  
  27.         SelectionTreeTemplateID      GetTreeTemplateID(const char* treeName) const;
  28.         bool                         HasTreeTemplate(const SelectionTreeTemplateID& templateID) const;
  29.         const SelectionTreeTemplate& GetTreeTemplate(const SelectionTreeTemplateID& templateID) const;
  30.  
  31.         // ISelectionTreeManager
  32.         virtual uint32                  GetSelectionTreeCount() const;
  33.         virtual uint32                  GetSelectionTreeCountOfType(const char* typeName) const;
  34.  
  35.         virtual const char*             GetSelectionTreeName(uint32 index) const;
  36.         virtual const char*             GetSelectionTreeNameOfType(const char* typeName, uint32 index) const;
  37.  
  38.         virtual ISelectionTreeDebugger* GetDebugger() const;
  39.         //~ISelectionTreeManager
  40.  
  41. private:
  42.         void ResetBehaviorSelectionTreeOfAIActorOfType(unsigned short int nType);
  43.  
  44.         void DiscoverFolder(const char* folderName);
  45.         bool Discover(const char* fileName);
  46.         bool LoadBlocks(const XmlNodeRef& blocksNode, const char* scope, const char* fileName);
  47.         bool LoadBlock(const XmlNodeRef& blockNode, const char* scope, const char* fileName);
  48.         bool DiscoverBlocks(const XmlNodeRef& rootNode, const char* scope, const char* fileName);
  49.  
  50.         bool LoadFileNode(const XmlNodeRef& rootNode, const char* fileName);
  51.         bool LoadTreeTemplate(const XmlNodeRef& rootNode, const char* fileName);
  52.  
  53.         typedef std::map<SelectionTreeTemplateID, SelectionTreeTemplate> TreeTemplates;
  54.         TreeTemplates m_templates;
  55.  
  56.         typedef std::multimap<string, SelectionTreeTemplateID> TreeTemplateTypes;
  57.         TreeTemplateTypes    m_templateTypes;
  58.  
  59.         BlockyXmlBlocks::Ptr m_blocks;
  60.  
  61.         struct FileNode
  62.         {
  63.                 FileNode(const char* file, const XmlNodeRef& node)
  64.                         : fileName(file)
  65.                         , rootNode(node)
  66.                 {
  67.                 }
  68.  
  69.                 string     fileName;
  70.                 XmlNodeRef rootNode;
  71.         };
  72.  
  73.         typedef std::vector<FileNode> FileNodes;
  74.         FileNodes m_fileNodes;
  75.  
  76.         typedef std::vector<string> FolderNames;
  77.         FolderNames m_folderNames;
  78. };
  79.  
  80. #endif
  81.  
downloadSelectionTreeManager.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