BVB Source Codes

CRYENGINE Show GameToken.h Source code

Return Download CRYENGINE: download GameToken.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:   GameToken.h
  5. //  Version:     v1.00
  6. //  Created:     20/10/2005 by Timur.
  7. //  Compilers:   Visual Studio.NET
  8. //  Description:
  9. // -------------------------------------------------------------------------
  10. //  History:
  11. //
  12. ////////////////////////////////////////////////////////////////////////////
  13.  
  14. #ifndef _GameToken_h_
  15. #define _GameToken_h_
  16. #pragma once
  17.  
  18. #include <CryGame/IGameTokens.h>
  19.  
  20. class CGameTokenSystem;
  21.  
  22. //////////////////////////////////////////////////////////////////////////
  23. class CGameToken : public IGameToken
  24. {
  25. public:
  26.         CGameToken();
  27.         ~CGameToken();
  28.  
  29.         //////////////////////////////////////////////////////////////////////////
  30.         // IGameToken implementation.
  31.         //////////////////////////////////////////////////////////////////////////
  32.         virtual void           SetName(const char* sName);
  33.         virtual const char*    GetName() const        { return m_name; }
  34.         virtual void           SetFlags(uint32 flags) { m_nFlags = flags; }
  35.         virtual uint32         GetFlags() const       { return m_nFlags; }
  36.         virtual EFlowDataTypes GetType() const        { return (EFlowDataTypes)m_value.GetType(); };
  37.         virtual void           SetType(EFlowDataTypes dataType);
  38.         virtual void           SetValue(const TFlowInputData& val);
  39.         virtual bool           GetValue(TFlowInputData& val) const;
  40.         virtual void           SetValueAsString(const char* sValue, bool bDefault = false);
  41.         virtual const char*    GetValueAsString() const;
  42.         //////////////////////////////////////////////////////////////////////////
  43.  
  44.         void       AddListener(IGameTokenEventListener* pListener)    { stl::push_back_unique(m_listeners, pListener); };
  45.         void       RemoveListener(IGameTokenEventListener* pListener) { stl::find_and_erase(m_listeners, pListener); };
  46.         void       Notify(EGameTokenEvent event);
  47.  
  48.         CTimeValue GetLastChangeTime() const { return m_changed; };
  49.  
  50.         void       GetMemoryStatistics(ICrySizer* s);
  51.  
  52. private:
  53.         friend class CGameTokenSystem; // Need access to m_name
  54.         static CGameTokenSystem* g_pGameTokenSystem;
  55.  
  56.         uint32                   m_nFlags;
  57.         string                   m_name;
  58.         TFlowInputData           m_value;
  59.  
  60.         CTimeValue               m_changed;
  61.  
  62.         typedef std::list<IGameTokenEventListener*> Listeneres;
  63.         Listeneres m_listeners;
  64. };
  65.  
  66. #endif // _GameToken_h_
  67.  
downloadGameToken.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