library of assembled shared sources

http://lass.cocamware.com

lass::io::BinaryIFile Class Reference

Input Stream for binary files. More...

#include <binary_i_file.h>

Inheritance diagram for lass::io::BinaryIFile:

Inheritance graph
[legend]
Collaboration diagram for lass::io::BinaryIFile:

Collaboration graph
[legend]

Public Member Functions

 BinaryIFile ()
 Construct an "empty" closed stream.
 BinaryIFile (const char *iFileName)
 Construct stream by filename and open it.
 BinaryIFile (const std::string &iFileName)
 Construct stream by filename and open it.
 ~BinaryIFile ()
 Close stream on destruction.
void open (const char *iFileName)
void open (const std::string &iFileName)
void close ()
bool is_open () const
long tellg () const
BinaryIStreamseekg (long iPosition)
BinaryIStreamseekg (long iOffset, std::ios_base::seekdir iDirection)
BinaryIStreamoperator>> (char &x)
BinaryIStreamoperator>> (num::Tint8 &x)
BinaryIStreamoperator>> (num::Tuint8 &x)
BinaryIStreamoperator>> (num::Tint16 &x)
BinaryIStreamoperator>> (num::Tuint16 &x)
BinaryIStreamoperator>> (num::Tint32 &x)
BinaryIStreamoperator>> (num::Tuint32 &x)
BinaryIStreamoperator>> (num::Tint64 &x)
BinaryIStreamoperator>> (num::Tuint64 &x)
BinaryIStreamoperator>> (num::Tfloat32 &x)
BinaryIStreamoperator>> (num::Tfloat64 &x)
BinaryIStreamoperator>> (bool &x)
BinaryIStreamoperator>> (void *&x)
BinaryIStreamoperator>> (std::string &oOut)
template<typename T >
BinaryIStreamoperator>> (std::vector< T > &oOut)
template<typename T >
BinaryIStreamoperator>> (std::complex< T > &oOut)
void read (void *oOutput, size_t iNumberOfBytes)
 read a number of bytes from stream to buffer
num::Endianness endianness () const
void setEndianness (num::Endianness iEndianness)
const bool good () const
const bool eof () const
const bool fail () const
const bool bad () const
std::ios_base::iostate rdstate () const
void clear (std::ios_base::iostate iState=std::ios_base::goodbit)
void setstate (std::ios_base::iostate iState)
 operator num::SafeBool () const
const bool operator! () const

Protected Member Functions

void swap (NonCopyable &)

Private Member Functions

long doTellg () const
void doSeekg (long iOffset, std::ios_base::seekdir iDirection)
void doRead (void *oOutput, size_t iNumberOfBytes)

Private Attributes

FILE * file_

Detailed Description

Input Stream for binary files.

Definition at line 68 of file binary_i_file.h.


Constructor & Destructor Documentation

lass::io::BinaryIFile::BinaryIFile (  ) 

Construct an "empty" closed stream.

Definition at line 61 of file binary_i_file.cpp.

lass::io::BinaryIFile::BinaryIFile ( const char *  iFileName  ) 

Construct stream by filename and open it.

Definition at line 71 of file binary_i_file.cpp.

References open().

lass::io::BinaryIFile::BinaryIFile ( const std::string &  iFileName  ) 

Construct stream by filename and open it.

Definition at line 82 of file binary_i_file.cpp.

References open().

lass::io::BinaryIFile::~BinaryIFile (  ) 

Close stream on destruction.

Definition at line 93 of file binary_i_file.cpp.

References close().


Member Function Documentation

void lass::io::BinaryIFile::open ( const char *  iFileName  ) 

Definition at line 100 of file binary_i_file.cpp.

References close(), file_, and lass::io::StreamBase::setstate().

Referenced by BinaryIFile(), and open().

void lass::io::BinaryIFile::open ( const std::string &  iFileName  ) 

Definition at line 112 of file binary_i_file.cpp.

References open().

void lass::io::BinaryIFile::close (  ) 

Definition at line 119 of file binary_i_file.cpp.

References file_, is_open(), and lass::io::StreamBase::setstate().

Referenced by open(), and ~BinaryIFile().

bool lass::io::BinaryIFile::is_open (  )  const

Definition at line 132 of file binary_i_file.cpp.

References file_.

Referenced by close().

long lass::io::BinaryIFile::doTellg (  )  const [private, virtual]

Implements lass::io::BinaryIStream.

Definition at line 141 of file binary_i_file.cpp.

References file_.

void lass::io::BinaryIFile::doSeekg ( long  iOffset,
std::ios_base::seekdir  iDirection 
) [private, virtual]

Implements lass::io::BinaryIStream.

Definition at line 148 of file binary_i_file.cpp.

References file_, LASS_META_ASSERT, and lass::io::StreamBase::setstate().

void lass::io::BinaryIFile::doRead ( void *  oOutput,
size_t  iNumberOfBytes 
) [private, virtual]

long lass::io::BinaryIStream::tellg (  )  const [inherited]

Definition at line 73 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::doTellg().

BinaryIStream & lass::io::BinaryIStream::seekg ( long  iPosition  )  [inherited]

BinaryIStream & lass::io::BinaryIStream::seekg ( long  iOffset,
std::ios_base::seekdir  iDirection 
) [inherited]

Definition at line 88 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::doSeekg().

BinaryIStream & lass::io::BinaryIStream::operator>> ( char &  x  )  [inherited]

Definition at line 96 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tint8 x  )  [inherited]

Definition at line 103 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tuint8 x  )  [inherited]

Definition at line 110 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tint16 x  )  [inherited]

Definition at line 117 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tuint16 x  )  [inherited]

Definition at line 124 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tint32 x  )  [inherited]

Definition at line 131 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tuint32 x  )  [inherited]

Definition at line 138 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tint64 x  )  [inherited]

Definition at line 145 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tuint64 x  )  [inherited]

Definition at line 152 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tfloat32 x  )  [inherited]

Definition at line 159 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( num::Tfloat64 x  )  [inherited]

Definition at line 166 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::readValue().

BinaryIStream & lass::io::BinaryIStream::operator>> ( bool &  x  )  [inherited]

Definition at line 173 of file binary_i_stream.cpp.

References lass::io::StreamBase::good().

BinaryIStream & lass::io::BinaryIStream::operator>> ( void *&  x  )  [inherited]

Definition at line 186 of file binary_i_stream.cpp.

References lass::io::StreamBase::good(), and LASS_META_ASSERT.

BinaryIStream & lass::io::BinaryIStream::operator>> ( std::string &  oOut  )  [inherited]

template<typename T >
BinaryIStream & lass::io::BinaryIStream::operator>> ( std::vector< T > &  oOut  )  [inline, inherited]

Definition at line 60 of file binary_i_stream.inl.

References lass::io::StreamBase::good(), LASS_ASSERT, and lass::stde::T.

template<typename T >
BinaryIStream & lass::io::BinaryIStream::operator>> ( std::complex< T > &  oOut  )  [inline, inherited]

Definition at line 95 of file binary_i_stream.inl.

References lass::io::StreamBase::good(), and lass::stde::T.

void lass::io::BinaryIStream::read ( void *  output,
size_t  numBytes 
) [inherited]

read a number of bytes from stream to buffer

Parameters:
iBytes pointer to buffer. Must be able to contain at least numBytes bytes.
numBytes number of bytes to be read

Definition at line 229 of file binary_i_stream.cpp.

References lass::io::BinaryIStream::doRead().

Referenced by lass::io::BinaryISocket::doRead(), lass::io::Image::openRadianceHdr(), lass::io::Image::openTargaTrueColor(), lass::io::Image::HeaderPfm::readFrom(), and lass::io::Image::HeaderRadianceHdr::readFrom().

num::Endianness lass::io::BinaryStreamBase::endianness (  )  const [inline, inherited]

void lass::io::BinaryStreamBase::setEndianness ( num::Endianness  iEndianness  )  [inline, inherited]

const bool lass::io::StreamBase::good (  )  const [inline, inherited]

const bool lass::io::StreamBase::eof (  )  const [inline, inherited]

Definition at line 77 of file stream_base.h.

Referenced by lass::io::Image::open(), and lass::io::Image::save().

const bool lass::io::StreamBase::fail (  )  const [inline, inherited]

Definition at line 78 of file stream_base.h.

Referenced by lass::io::StreamBase::operator num::SafeBool().

const bool lass::io::StreamBase::bad (  )  const [inline, inherited]

Definition at line 79 of file stream_base.h.

std::ios_base::iostate lass::io::StreamBase::rdstate (  )  const [inline, inherited]

Definition at line 80 of file stream_base.h.

Referenced by lass::io::XmlOElement::XmlOElement().

void lass::io::StreamBase::clear ( std::ios_base::iostate  iState = std::ios_base::goodbit  )  [inline, inherited]

void lass::io::StreamBase::setstate ( std::ios_base::iostate  iState  )  [inline, inherited]

lass::io::StreamBase::operator num::SafeBool (  )  const [inline, inherited]

const bool lass::io::StreamBase::operator! (  )  const [inline, inherited]

Definition at line 84 of file stream_base.h.

void lass::util::NonCopyable::swap ( NonCopyable  )  [inline, protected, inherited]

Definition at line 60 of file non_copyable.h.

Referenced by lass::io::Image::readLine().


Field Documentation

Definition at line 88 of file binary_i_file.h.

Referenced by close(), doRead(), doSeekg(), doTellg(), is_open(), and open().


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

Generated on Mon Nov 10 14:22:09 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo