VTFLib
A C and C++ API that, with a few simple functions, can open and save .vtf and .vmt files.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MemoryWriter.h
1 /*
2  * VTFLib
3  * Copyright (C) 2005-2010 Neil Jedrzejewski & Ryan Gregg
4 
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later
9  * version.
10  */
11 
12 #ifndef VTFLIB_MEMORYWRITER_H
13 #define VTFLIB_MEMORYWRITER_H
14 
15 #include "stdafx.h"
16 #include "Writer.h"
17 
18 namespace VTFLib
19 {
20  namespace IO
21  {
22  namespace Writers
23  {
24  class CMemoryWriter : public IWriter
25  {
26  private:
27  vlBool bOpened;
28 
29  vlVoid *vData;
30  vlSize uiBufferSize;
31 
32  vlSize uiPointer;
33  vlSize uiLength;
34 
35  public:
36  CMemoryWriter(vlVoid *vData, vlSize uiBufferSize);
37  ~CMemoryWriter();
38 
39  public:
40  virtual vlBool Opened() const;
41 
42  virtual vlBool Open();
43  virtual vlVoid Close();
44 
45  virtual vlSSize GetStreamSize() const;
46  virtual vlSSize GetStreamPointer() const;
47 
48  virtual vlSSize Seek(vlOffset lOffset, VLSeekMode uiMode);
49 
50  virtual vlBool Write(vlChar cChar);
51  virtual vlSize Write(vlVoid *vData, vlSize uiBytes);
52  };
53  }
54  }
55 }
56 
57 #endif
char vlChar
Single signed character.
Definition: stdafx.h:51
Application framework header plus VTFLib custom data types.
void vlVoid
Void value.
Definition: stdafx.h:61
unsigned char vlBool
Boolean value 0/1.
Definition: stdafx.h:50