3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #ifndef _INCLUDE_SOURCEMOD_CDATAPACK_H_
16 #define _INCLUDE_SOURCEMOD_CDATAPACK_H_
18 #include <IDataPack.h>
20 using namespace SourceMod;
22 class CDataPack : public IDataPack
29 size_t GetPosition() const;
30 bool SetPosition(size_t pos) const;
31 cell_t ReadCell() const;
32 float ReadFloat() const;
33 bool IsReadable(size_t bytes) const;
34 const char *ReadString(size_t *len) const;
35 void *GetMemory() const;
36 void *ReadMemory(size_t *size) const;
39 void PackCell(cell_t cell);
40 void PackFloat(float val);
41 void PackString(const char *string);
42 size_t CreateMemory(size_t size, void **addr);
46 void CheckSize(size_t sizetype);
49 mutable char *m_curptr;
54 #endif //_INCLUDE_SOURCEMOD_CDATAPACK_H_