bytestreamin.hpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: bytestreamin.hpp
5 
6  CONTENTS:
7 
8  PROGRAMMERS:
9 
10  martin.isenburg@gmail.com
11 
12  COPYRIGHT:
13 
14  (c) 2010-2011, Martin Isenburg, LASSO - tools to catch reality
15 
16  This is free software; you can redistribute and/or modify it under the
17  terms of the GNU Lesser General Licence as published by the Free Software
18  Foundation. See the COPYING file for more information.
19 
20  This software is distributed WITHOUT ANY WARRANTY and without even the
21  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22 
23  CHANGE HISTORY:
24 
25  1 October 2011 -- added 64 bit file support in MSVC 6.0 at McCafe at Hbf Linz
26  10 January 2011 -- licensing change for LGPL release and liblas integration
27  12 December 2010 -- created from ByteStreamOutFile after Howard got pushy (-;
28 
29 ===============================================================================
30 */
31 #ifndef BYTE_STREAM_IN_HPP
32 #define BYTE_STREAM_IN_HPP
33 
34 #include "mydefs.hpp"
35 
37 {
38 public:
39 /* read a single byte */
40  virtual U32 getByte() = 0;
41 /* read an array of bytes */
42  virtual void getBytes(U8* bytes, const U32 num_bytes) = 0;
43 /* read 16 bit low-endian field */
44  virtual void get16bitsLE(U8* bytes) = 0;
45 /* read 32 bit low-endian field */
46  virtual void get32bitsLE(U8* bytes) = 0;
47 /* read 64 bit low-endian field */
48  virtual void get64bitsLE(U8* bytes) = 0;
49 /* read 16 bit big-endian field */
50  virtual void get16bitsBE(U8* bytes) = 0;
51 /* read 32 bit big-endian field */
52  virtual void get32bitsBE(U8* bytes) = 0;
53 /* read 64 bit big-endian field */
54  virtual void get64bitsBE(U8* bytes) = 0;
55 /* is the stream seekable (e.g. stdin is not) */
56  virtual BOOL isSeekable() const = 0;
57 /* get current position of stream */
58  virtual I64 tell() const = 0;
59 /* seek to this position in the stream */
60  virtual BOOL seek(const I64 position) = 0;
61 /* seek to the end of the file */
62  virtual BOOL seekEnd(const I64 distance=0) = 0;
63 /* destructor */
64  virtual ~ByteStreamIn() {};
65 };
66 
67 #endif
int BOOL
Definition: mydefs.hpp:57
virtual I64 tell() const =0
virtual BOOL isSeekable() const =0
unsigned int U32
Definition: mydefs.hpp:39
virtual void get32bitsBE(U8 *bytes)=0
virtual BOOL seek(const I64 position)=0
long long I64
Definition: mydefs.hpp:48
unsigned char U8
Definition: mydefs.hpp:41
virtual void getBytes(U8 *bytes, const U32 num_bytes)=0
virtual ~ByteStreamIn()
virtual void get64bitsLE(U8 *bytes)=0
virtual void get32bitsLE(U8 *bytes)=0
virtual void get64bitsBE(U8 *bytes)=0
virtual U32 getByte()=0
virtual BOOL seekEnd(const I64 distance=0)=0
virtual void get16bitsLE(U8 *bytes)=0
virtual void get16bitsBE(U8 *bytes)=0


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:06