GEOS  3.9.1dev
Public Member Functions | Private Attributes | List of all members
geos::io::ByteOrderDataInStream Class Reference

Allows reading an stream of primitive datatypes from an underlying istream, with the representation being in either common byte ordering. More...

#include <ByteOrderDataInStream.h>

Public Member Functions

 ByteOrderDataInStream (std::istream *s=nullptr)
 
 ~ByteOrderDataInStream ()
 
void setInStream (std::istream *s)
 
void setOrder (int order)
 
unsigned char readByte ()
 
int readInt ()
 
long readLong ()
 
double readDouble ()
 

Private Attributes

int byteOrder
 
std::istream * stream
 
unsigned char buf [8]
 

Detailed Description

Allows reading an stream of primitive datatypes from an underlying istream, with the representation being in either common byte ordering.

Definition at line 41 of file ByteOrderDataInStream.h.

Constructor & Destructor Documentation

geos::io::ByteOrderDataInStream::ByteOrderDataInStream ( std::istream *  s = nullptr)
geos::io::ByteOrderDataInStream::~ByteOrderDataInStream ( )

Member Function Documentation

unsigned char geos::io::ByteOrderDataInStream::readByte ( )
double geos::io::ByteOrderDataInStream::readDouble ( )
int geos::io::ByteOrderDataInStream::readInt ( )
long geos::io::ByteOrderDataInStream::readLong ( )
void geos::io::ByteOrderDataInStream::setInStream ( std::istream *  s)

Allows a single ByteOrderDataInStream to be reused on multiple istream.

void geos::io::ByteOrderDataInStream::setOrder ( int  order)

Member Data Documentation

unsigned char geos::io::ByteOrderDataInStream::buf[8]
private

Definition at line 70 of file ByteOrderDataInStream.h.

int geos::io::ByteOrderDataInStream::byteOrder
private

Definition at line 66 of file ByteOrderDataInStream.h.

std::istream* geos::io::ByteOrderDataInStream::stream
private

Definition at line 67 of file ByteOrderDataInStream.h.


The documentation for this class was generated from the following file: