library of assembled shared sources

http://lass.cocamware.com

lass::io::BinaryIMemoryBlock Class Reference

Input Stream from a memory block. More...

#include <binary_i_memory_block.h>

Inheritance diagram for lass::io::BinaryIMemoryBlock:

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

Collaboration graph
[legend]

Public Member Functions

 BinaryIMemoryBlock ()
 Construct an "empty" closed stream.
 BinaryIMemoryBlock (const void *iBegin, long iSize)
 Construct stream by pointer to memory block and length of block.
 BinaryIMemoryBlock (const void *iBegin, const void *iEnd)
 Construct stream by pointer to memory block and to one byte past end of block.
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 Types

typedef char TByte

Private Member Functions

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

Private Attributes

const TBytebegin_
long size_
long position_

Detailed Description

Input Stream from a memory block.

Definition at line 68 of file binary_i_memory_block.h.


Member Typedef Documentation

typedef char lass::io::BinaryIMemoryBlock::TByte [private]

Definition at line 78 of file binary_i_memory_block.h.


Constructor & Destructor Documentation

lass::io::BinaryIMemoryBlock::BinaryIMemoryBlock (  ) 

Construct an "empty" closed stream.

Definition at line 54 of file binary_i_memory_block.cpp.

lass::io::BinaryIMemoryBlock::BinaryIMemoryBlock ( const void *  iBegin,
long  iSize 
)

Construct stream by pointer to memory block and length of block.

Definition at line 66 of file binary_i_memory_block.cpp.

References LASS_ASSERT, and size_.

lass::io::BinaryIMemoryBlock::BinaryIMemoryBlock ( const void *  iBegin,
const void *  iEnd 
)

Construct stream by pointer to memory block and to one byte past end of block.

Definition at line 79 of file binary_i_memory_block.cpp.

References LASS_ASSERT, and size_.


Member Function Documentation

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

Implements lass::io::BinaryIStream.

Definition at line 119 of file binary_i_memory_block.cpp.

References position_.

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

Implements lass::io::BinaryIStream.

Definition at line 126 of file binary_i_memory_block.cpp.

References LASS_ASSERT, position_, and size_.

void lass::io::BinaryIMemoryBlock::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 84 of file binary_i_memory_block.h.

Referenced by doRead().

Definition at line 85 of file binary_i_memory_block.h.

Referenced by BinaryIMemoryBlock(), doRead(), and doSeekg().

Definition at line 86 of file binary_i_memory_block.h.

Referenced by doRead(), doSeekg(), and doTellg().


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