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
MemoryReader.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_MEMORYREADER_H
13 #define VTFLIB_MEMORYREADER_H
14 
15 #include "stdafx.h"
16 #include "Reader.h"
17 
18 namespace VTFLib
19 {
20  namespace IO
21  {
22  namespace Readers
23  {
24  class CMemoryReader : public IReader
25  {
26  private:
27  vlBool bOpened;
28 
29  const vlVoid *vData;
30  vlSize uiBufferSize;
31 
32  vlSize uiPointer;
33 
34  public:
35  CMemoryReader(const vlVoid *vData, vlSize uiBufferSize);
36  ~CMemoryReader();
37 
38  public:
39  virtual vlBool Opened() const;
40 
41  virtual vlBool Open();
42  virtual vlVoid Close();
43 
44  virtual vlSSize GetStreamSize() const;
45  virtual vlSSize GetStreamPointer() const;
46 
47  virtual vlSSize Seek(vlOffset lOffset, VLSeekMode uiMode);
48 
49  virtual vlBool Read(vlChar &cChar);
50  virtual vlSize Read(vlVoid *vData, vlSize uiBytes);
51  };
52  }
53  }
54 }
55 
56 #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