BVB Source Codes

CRYENGINE Show GoalOpFactory.cpp Source code

Return Download CRYENGINE: download GoalOpFactory.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /********************************************************************
  4.    -------------------------------------------------------------------------
  5.    File name:   ScriptBind_AI.cpp
  6.    Description: Goal Op Factory interface and management classes
  7.  
  8.    -------------------------------------------------------------------------
  9.    History:
  10.    -24:02:2008   - Created by Matthew
  11.  
  12.  *********************************************************************/
  13.  
  14. #include "StdAfx.h"
  15. #include "GoalOpFactory.h"
  16.  
  17. IGoalOp* CGoalOpFactoryOrdering::GetGoalOp(const char* sGoalOpName, IFunctionHandler* pH, int nFirstParam, GoalParameters& params) const
  18. {
  19.         IGoalOp* pResult = NULL;
  20.         const TFactoryVector::const_iterator itEnd = m_Factories.end();
  21.         for (TFactoryVector::const_iterator it = m_Factories.begin(); !pResult && it != itEnd; ++it)
  22.                 pResult = (*it)->GetGoalOp(sGoalOpName, pH, nFirstParam, params);
  23.         return pResult;
  24. }
  25.  
  26. IGoalOp* CGoalOpFactoryOrdering::GetGoalOp(EGoalOperations op, GoalParameters& params) const
  27. {
  28.         FUNCTION_PROFILER(GetISystem(), PROFILE_AI);
  29.  
  30.         IGoalOp* pResult = NULL;
  31.         const TFactoryVector::const_iterator itEnd = m_Factories.end();
  32.         for (TFactoryVector::const_iterator it = m_Factories.begin(); !pResult && it != itEnd; ++it)
  33.                 pResult = (*it)->GetGoalOp(op, params);
  34.         return pResult;
  35. }
  36.  
  37. void CGoalOpFactoryOrdering::AddFactory(IGoalOpFactory* pFactory)
  38. {
  39.         m_Factories.push_back(pFactory);
  40. }
  41.  
  42. void CGoalOpFactoryOrdering::PrepareForFactories(size_t count)
  43. {
  44.         m_Factories.reserve(count);
  45. }
  46.  
  47. void CGoalOpFactoryOrdering::DestroyAll(void)
  48. {
  49.         const TFactoryVector::const_iterator itEnd = m_Factories.end();
  50.         for (TFactoryVector::const_iterator it = m_Factories.begin(); it != itEnd; ++it)
  51.                 delete (*it);
  52.         m_Factories.clear();
  53. }
  54.  
downloadGoalOpFactory.cpp 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