BVB Source Codes

CRYENGINE Show XMLCPB_AttrSetTableReader.h Source code

Return Download CRYENGINE: download XMLCPB_AttrSetTableReader.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_ATTRSET_TABLE_READER_H
  8.         #define XMLCPB_ATTRSET_TABLE_READER_H
  9.  
  10.         #include "../XMLCPB_Common.h"
  11.         #include "XMLCPB_BufferReader.h"
  12.         #include <CryCore/Platform/IPlatformOS.h>
  13.  
  14. // an "AttrSet" defines the datatype + tagId of all the attributes of a node.  each datatype+tagId entry is called a "header".
  15. // those sets are stored in a common table because many nodes use the same type of attrs
  16.  
  17. namespace XMLCPB {
  18.  
  19. class CReader;
  20.  
  21. class CAttrSetTableReader
  22. {
  23. public:
  24.         explicit CAttrSetTableReader(IGeneralMemoryHeap* pHeap);
  25.  
  26.         uint32 GetNumAttrs(AttrSetID setId) const;
  27.         uint16 GetHeaderAttr(AttrSetID setId, uint32 indAttr) const;
  28.  
  29.         uint32 GetNumSets() const { return m_setAddrs.size(); }
  30.  
  31.         void   ReadFromFile(CReader& Reader, IPlatformOS::ISaveReaderPtr& pOSSaveReader, const SFileHeader& headerInfo);
  32.         void   ReadFromMemory(CReader& Reader, const uint8* pData, uint32 dataSize, const SFileHeader& headerInfo, uint32& outReadLoc);
  33.  
  34. private:
  35.         typedef DynArray<FlatAddr16, int, NArray::SmallDynStorage<NAlloc::GeneralHeapAlloc>> SetAddrVec;
  36.         typedef DynArray<uint8, int, NArray::SmallDynStorage<NAlloc::GeneralHeapAlloc>>      NumAttrsVec;
  37.  
  38.         SetAddrVec    m_setAddrs;
  39.         NumAttrsVec   m_numAttrs;
  40.         SBufferReader m_buffer;
  41. };
  42.  
  43. }  // end namespace
  44.  
  45. #endif
  46.  
downloadXMLCPB_AttrSetTableReader.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