BVB Source Codes

CRYENGINE Show GameStatsConfig.h Source code

Return Download CRYENGINE: download GameStatsConfig.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.    -------------------------------------------------------------------------
  5.    $Id$
  6.    $DateTime$
  7.    Description:
  8.    GameStatsConfig - configurator for GameSpy Stats&Tracking service
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 9:9:2007   15:38 : Created by Stas Spivakov
  12.  
  13. *************************************************************************/
  14.  
  15. #ifndef __GAMESTATSCONFIG_H__
  16. #define __GAMESTATSCONFIG_H__
  17.  
  18. #if _MSC_VER > 1000
  19.         #pragma once
  20. #endif
  21.  
  22. #include <CryGame/IGameFramework.h>
  23.  
  24. class CGameStatsConfig : public IGameStatsConfig
  25. {
  26.         struct SKeyDef
  27.         {
  28.                 SKeyDef(int key, const char* group) : m_key(key), m_group(group){}
  29.                 int    m_key;
  30.                 string m_group;
  31.         };
  32.         typedef std::map<string, SKeyDef> TKeyDefMap;
  33.  
  34.         struct SCategoryEntry
  35.         {
  36.                 int    m_code;
  37.                 string m_keyName;
  38.                 string m_display;
  39.         };
  40.  
  41.         struct SCategory
  42.         {
  43.                 string                      m_name;
  44.                 int                         m_mod;
  45.                 std::vector<SCategoryEntry> m_entries;
  46.         };
  47.  
  48.         typedef std::vector<SCategory> TCategoryVector;
  49. public:
  50.         CGameStatsConfig();
  51.         ~CGameStatsConfig();
  52.         void ReadConfig();
  53.         //////////////////////////////////////////////////////////////////////////
  54.         // IGameStatsConfig
  55.         virtual int         GetStatsVersion();
  56.         virtual int         GetCategoryMod(const char* cat);
  57.         virtual const char* GetValueNameByCode(const char* cat, int id);
  58.         virtual int         GetKeyId(const char* key) const;
  59.         //////////////////////////////////////////////////////////////////////////
  60.         int                 GetCodeByKeyName(const char* cat, const char* key) const;
  61. private:
  62.         int             m_version;
  63.         TKeyDefMap      m_map;
  64.         TCategoryVector m_categories;
  65. };
  66.  
  67. #endif //__GAMESTATSCONFIG_H__
  68.  
downloadGameStatsConfig.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