Panda3D
physxMemoryWriteBuffer.h
1 // Filename: physxMemoryWriteBuffer.h
2 // Created by: enn0x (11Oct09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXMEMORYWRITEBUFFER_H
16 #define PHYSXMEMORYWRITEBUFFER_H
17 
18 #include "pandabase.h"
19 
20 #include "physx_includes.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : PhysxMemoryWriteBuffer
24 // Description :
25 ////////////////////////////////////////////////////////////////////
26 class EXPCL_PANDAPHYSX PhysxMemoryWriteBuffer : public NxStream {
27 
28 public:
30  virtual ~PhysxMemoryWriteBuffer();
31 
32  virtual NxU8 readByte() const { NX_ASSERT(0); return 0; }
33  virtual NxU16 readWord() const { NX_ASSERT(0); return 0; }
34  virtual NxU32 readDword() const { NX_ASSERT(0); return 0; }
35  virtual float readFloat() const { NX_ASSERT(0); return 0.0f; }
36  virtual double readDouble() const { NX_ASSERT(0); return 0.0; }
37  virtual void readBuffer(void *buffer, NxU32 size) const { NX_ASSERT(0); }
38 
39  virtual NxStream &storeByte(NxU8 b);
40  virtual NxStream &storeWord(NxU16 w);
41  virtual NxStream &storeDword(NxU32 d);
42  virtual NxStream &storeFloat(NxReal f);
43  virtual NxStream &storeDouble(NxF64 f);
44  virtual NxStream &storeBuffer(const void *buffer, NxU32 size);
45 
46  NxU32 currentSize;
47  NxU32 maxSize;
48  NxU8 *data;
49 };
50 
51 #endif // PHYSXMEMORYWRITEBUFFER_H