BVB Source Codes

CRYENGINE Show Adapters.h Source code

Return Download CRYENGINE: download Adapters.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:   Adapters.h
  5. //  Created:     02/02/2009 by Matthew
  6. //  Description: Implements adapters for AI objects from external interfaces to internal
  7. //               This is purely a translation layer without concrete instances
  8. //               They can have no state and must remain abstract
  9. //
  10. //               * Note that this is fast becoming redundant! Mainly shells now *
  11. //
  12. // --------------------------------------------------------------------------------------
  13. //  History:
  14. //
  15. /////////////////////////////////////////////////////////////////////////////////////////
  16.  
  17. #ifndef __AI_ADAPTERS_H_
  18. #define __AI_ADAPTERS_H_
  19.  
  20. #pragma once
  21.  
  22. #include <CryAISystem/IAgent.h>
  23. #include "AIObject.h"
  24. #include "ObjectContainer.h"
  25.  
  26. #include <CryAISystem/IAIGroup.h>
  27.  
  28. CWeakRef<CAIObject> GetWeakRefSafe(IAIObject* pObj);
  29.  
  30. class CPipeUserAdapter
  31.         : public IPipeUser
  32. {
  33. public:
  34.         virtual ~CPipeUserAdapter() {}
  35.  
  36.         virtual bool       SelectPipe(int id, const char* name, CWeakRef<CAIObject> refArgument, int goalPipeId = 0, bool resetAlways = false, const GoalParams* node = 0) = 0;
  37.         virtual IGoalPipe* InsertSubPipe(int id, const char* name, CWeakRef<CAIObject> refArgument = NILREF, int goalPipeId = 0, const GoalParams* node = 0) = 0;
  38.  
  39. private:
  40.         bool       SelectPipe(int id, const char* name, IAIObject* pArgument = 0, int goalPipeId = 0, bool resetAlways = false, const GoalParams* node = 0)
  41.         { return SelectPipe(id, name, GetWeakRefSafe(pArgument), goalPipeId, resetAlways, node); }
  42.         IGoalPipe* InsertSubPipe(int id, const char* name, IAIObject* pArgument = 0, int goalPipeId = 0, const GoalParams* node = 0)
  43.         { return InsertSubPipe(id, name, GetWeakRefSafe(pArgument), goalPipeId, node); }
  44.  
  45. };
  46.  
  47. class CAIGroupAdapter
  48.         : public IAIGroup
  49. {
  50. public:
  51.         // cppcheck-suppress passedByValue
  52.         virtual CWeakRef<CAIObject> GetAttentionTarget(bool bHostileOnly = false, bool bLiveOnly = false, const CWeakRef<CAIObject> refSkipTarget = NILREF) const = 0;
  53.  
  54. private:
  55.         IAIObject* GetAttentionTarget(bool bHostileOnly = false, bool bLiveOnly = false) const;
  56. };
  57.  
  58. #endif //__AI_ADAPTERS_H_
  59.  
downloadAdapters.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