BVB Source Codes

CRYENGINE Show AISignal.h Source code

Return Download CRYENGINE: download AISignal.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef _AISIGNAL_H_
  4. #define _AISIGNAL_H_
  5.  
  6. #if _MSC_VER > 1000
  7.         #pragma once
  8. #endif
  9.  
  10. #include <CryAISystem/IAISystem.h>
  11. #include <CryNetwork/ISerialize.h>
  12. #include <CryMemory/PoolAllocator.h>
  13.  
  14. struct AISignalExtraData : public IAISignalExtraData
  15. {
  16. public:
  17.         static void CleanupPool();
  18.  
  19. public:
  20.         AISignalExtraData();
  21.         AISignalExtraData(const AISignalExtraData& other) : IAISignalExtraData(other), sObjectName() { SetObjectName(other.sObjectName); }
  22.         virtual ~AISignalExtraData();
  23.  
  24.         AISignalExtraData& operator=(const AISignalExtraData& other);
  25.         virtual void       Serialize(TSerialize ser);
  26.  
  27.         inline void*       operator new(size_t size)
  28.         {
  29.                 return m_signalExtraDataAlloc.Allocate();
  30.         }
  31.  
  32.         inline void operator delete(void* p)
  33.         {
  34.                 return m_signalExtraDataAlloc.Deallocate(p);
  35.         }
  36.  
  37.         virtual const char* GetObjectName() const { return sObjectName ? sObjectName : ""; }
  38.         virtual void        SetObjectName(const char* objectName);
  39.  
  40.         // To/from script table
  41.         virtual void ToScriptTable(SmartScriptTable& table) const;
  42.         virtual void FromScriptTable(const SmartScriptTable& table);
  43.  
  44. private:
  45.         char* sObjectName;
  46.  
  47.         typedef stl::PoolAllocator<sizeof(IAISignalExtraData) + sizeof(void*),
  48.                                    stl::PoolAllocatorSynchronizationSinglethreaded> SignalExtraDataAlloc;
  49.         static SignalExtraDataAlloc m_signalExtraDataAlloc;
  50. };
  51.  
  52. #endif
  53.  
downloadAISignal.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