BVB Source Codes

CRYENGINE Show SerializeScriptTableWriter.h Source code

Return Download CRYENGINE: download SerializeScriptTableWriter.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef __SERIALIZESCRIPTTABLEWRITER_H__
  4. #define __SERIALIZESCRIPTTABLEWRITER_H__
  5.  
  6. #pragma once
  7.  
  8. #include <CryNetwork/SimpleSerialize.h>
  9. #include <stack>
  10.  
  11. class CSerializeScriptTableWriterImpl : public CSimpleSerializeImpl<false, eST_Script>
  12. {
  13. public:
  14.         CSerializeScriptTableWriterImpl(SmartScriptTable tbl = SmartScriptTable());
  15.  
  16.         template<class T>
  17.         void Value(const char* name, const T& value)
  18.         {
  19.                 IScriptTable* pTbl = CurTable();
  20.                 pTbl->SetValue(name, value);
  21.         }
  22.  
  23.         void Value(const char* name, SNetObjectID value)
  24.         {
  25.                 CRY_ASSERT(false);
  26.         }
  27.  
  28.         void Value(const char* name, XmlNodeRef ref)
  29.         {
  30.                 CRY_ASSERT(false);
  31.         }
  32.  
  33.         void Value(const char* name, Vec3 value);
  34.         void Value(const char* name, Vec2 value);
  35.         void Value(const char* name, const SSerializeString& value);
  36.         void Value(const char* name, int64 value);
  37.         void Value(const char* name, Quat value);
  38.         void Value(const char* name, uint64 value);
  39.         void Value(const char* name, CTimeValue value);
  40.  
  41.         template<class T, class P>
  42.         void Value(const char* name, T& value, const P& p)
  43.         {
  44.                 Value(name, value);
  45.         }
  46.  
  47.         bool BeginGroup(const char* szName);
  48.         bool BeginOptionalGroup(const char* szName, bool cond) { return false; }
  49.         void EndGroup();
  50.  
  51. private:
  52.         std::stack<SmartScriptTable> m_tables;
  53.         IScriptTable*    CurTable() { return m_tables.top().GetPtr(); }
  54.         SmartScriptTable ReuseTable(const char* name);
  55.  
  56.         IScriptSystem* m_pSS;
  57. };
  58.  
  59. #endif
  60.  
downloadSerializeScriptTableWriter.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