43 virtual const char*
getName() = 0;
51 return read( (
char* )&value,
sizeof( value ) );
67 return read( (
char* )&value,
sizeof( value ) );
73 return read( (
char* )&value,
sizeof( value ) );
94 if( ( medInt & 0x00800000 ) == 0 )
100 medInt |= 0xFF000000;
108 return read( (
char* )&value,
sizeof( value ) );
114 return read( (
char* )&value,
sizeof( value ) );
133 return read( (
char* )&value,
sizeof( value ) );
140 return read( ( (
char* )&value ) + 2, 2 );
147 return read( ( (
char* )&value ) + 1, 3 );
153 return read( (
char* )&value,
sizeof( value ) );
159 virtual bool eof() = 0;
InStream & readShort(unsigned short &value)
reads a single short from the input buffer/stream
Definition: InStream.h:71
Definition: InStream.h:229
InStream & readFloat2(float &value)
reads a 2-byte float to the input buffer/stream
Definition: InStream.h:137
InStream & readFloat3(float &value)
reads a 3-byte float to the input buffer/stream
Definition: InStream.h:144
size_t bytesRead()
Indicates the number of bytes read in the last operation.
Definition: InStream.h:162
InStream & readUCharHex(unsigned char &byte)
reads a single unsigned char from the input buffer/stream as 2 hex chars
Definition: InStream.cpp:24
size_t getBytesRead()
Indicates the number of bytes read in the last operation.
Definition: InStream.h:168
void incBytesRead()
Definition: InStream.h:193
InStream & readFloat(float &value)
reads a 4-byte float to the input buffer/stream
Definition: InStream.h:131
virtual ~InStream()
Destructor.
Definition: InStream.h:34
InStream & readInt24(int &medInt)
reads a 3-byte integer to the input buffer/stream only works on little-endian machines! ...
Definition: InStream.h:91
InStream & readCharHex(signed char &byte)
reads a single unsigned char from the input buffer/stream as 2 hex chars
Definition: InStream.cpp:15
size_t lastRead_
Definition: InStream.h:219
virtual bool isReadable()=0
indicates whether the stream can actually be read from.
virtual InStream & read(char *buffer, unsigned int num)
doesn't really read num bytes from stream to the buffer
Definition: InStream.h:234
virtual InStream & readLine(char *buf, unsigned int bufsize)
Definition: InStream.cpp:33
InStream & readUShortHex(unsigned short &value)
reads a single unsigned short from the input buffer/stream as 4 hex chars
Definition: InStream.cpp:76
This is a very abstract class that can be implemented by classes that want to receive stream input...
Definition: InStream.h:29
size_t totalBytesRead_
Definition: InStream.h:221
void incBytesRead(size_t incRead)
Definition: InStream.h:199
InStream & readShort(short &value)
reads a single short from the input buffer/stream
Definition: InStream.h:65
InStream()
Protected Constructor for abstract class.
Definition: InStream.h:182
InStream & readUShortCompact(unsigned short &value)
reads an unsigned short integer as 1 to 3 bytes, encoded as follows: xxxxxxx0 - 7 bit value...
Definition: InStream.cpp:90
virtual bool isReadable()
indicates that the stream can't actually be read from.
Definition: InStream.h:240
InStream & readLongLongCompact(long long &value)
reads a signed long long integer as 1 to 9 bytes, encoded as follows: 0xxxxxxx - 7 bit value...
Definition: InStream.cpp:130
InStream & readDouble(double &value)
reads a 8-byte double to the input buffer/stream
Definition: InStream.h:151
void zeroTotalBytesRead()
Definition: InStream.h:211
virtual bool eof()
Indicates that the end of file has been reached.
Definition: InStream.h:246
virtual bool eof()=0
Indicates if the end of file has been reached.
void zeroBytesRead()
Definition: InStream.h:188
InStream & readInt(int &value)
reads a 4-byte integer to the input buffer/stream
Definition: InStream.h:106
void setBytesRead(size_t lastRead)
Definition: InStream.h:205
virtual InStream & read(char *buffer, size_t num)=0
reads num bytes from stream to the buffer
virtual const char * getName()=0
returns name of the stream
InStream & readLongLong(long long &value)
reads a 8-byte integer to the input buffer/stream
Definition: InStream.h:112
InStream & readShortHex(short &word)
reads a single short from the input buffer/stream as 4 hex chars
Definition: InStream.cpp:66
size_t getTotalBytesRead()
Indicates the total number of bytes read;.
Definition: InStream.h:174
virtual InStream & readUntil(char *buf, unsigned int num, unsigned char match)
Definition: InStream.cpp:242
InStream & readChar(signed char &value)
reads a single byte to the input buffer/stream
Definition: InStream.h:49