BVB Source Codes

CRYENGINE Show XMLCPB_StringTableReader.h Source code

Return Download CRYENGINE: download XMLCPB_StringTableReader.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4. *************************************************************************/
  5.  
  6. #pragma once
  7. #ifndef XMLCPB_STRING_TABLE_READER_H
  8.         #define XMLCPB_STRING_TABLE_READER_H
  9.  
  10.         #include "../XMLCPB_Common.h"
  11.         #include "XMLCPB_BufferReader.h"
  12.         #include <CryCore/Platform/IPlatformOS.h>
  13.  
  14. namespace XMLCPB {
  15.  
  16. class CReader;
  17.  
  18. class CStringTableReader
  19. {
  20. public:
  21.         explicit CStringTableReader(IGeneralMemoryHeap* pHeap);
  22.  
  23.         const char* GetString(StringID stringId) const;
  24.         int         GetNumStrings() const { return m_stringAddrs.size(); }
  25.  
  26.         void        ReadFromFile(CReader& Reader, IPlatformOS::ISaveReaderPtr pOSSaveReader, const SFileHeader::SStringTable& headerInfo);
  27.         void        ReadFromMemory(CReader& Reader, const uint8* pData, uint32 dataSize, const SFileHeader::SStringTable& headerInfo, uint32& outReadLoc);
  28.  
  29.         // for debug and testing
  30.         #ifndef _RELEASE
  31.         void WriteStringsIntoTextFile(const char* pFileName);
  32.         #endif
  33.  
  34. private:
  35.         typedef DynArray<FlatAddr, int, NArray::SmallDynStorage<NAlloc::GeneralHeapAlloc>> FlatAddrVec;
  36.  
  37. private:
  38.         SBufferReader m_buffer;
  39.         FlatAddrVec   m_stringAddrs;
  40. };
  41.  
  42. }  // end namespace
  43.  
  44. #endif
  45.  
downloadXMLCPB_StringTableReader.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