library of assembled shared sources

http://lass.cocamware.com

lass::io::BinaryOStream Class Reference

base class of binary output streams. More...

#include <binary_o_stream.h>

Inheritance diagram for lass::io::BinaryOStream:

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

Collaboration graph
[legend]

Public Member Functions

 BinaryOStream ()
 ~BinaryOStream ()
long tellp () const
BinaryOStreamseekp (long position)
BinaryOStreamseekp (long offset, std::ios_base::seekdir direction)
void flush ()
BinaryOStreamoperator<< (char x)
BinaryOStreamoperator<< (num::Tint8 x)
BinaryOStreamoperator<< (num::Tuint8 x)
BinaryOStreamoperator<< (num::Tint16 x)
BinaryOStreamoperator<< (num::Tuint16 x)
BinaryOStreamoperator<< (num::Tint32 x)
BinaryOStreamoperator<< (num::Tuint32 x)
BinaryOStreamoperator<< (num::Tint64 x)
BinaryOStreamoperator<< (num::Tuint64 x)
BinaryOStreamoperator<< (num::Tfloat32 x)
BinaryOStreamoperator<< (num::Tfloat64 x)
BinaryOStreamoperator<< (bool x)
BinaryOStreamoperator<< (const void *x)
BinaryOStreamoperator<< (const char *x)
BinaryOStreamoperator<< (const std::string &x)
template<typename T >
BinaryOStreamoperator<< (const std::vector< T > &x)
template<typename T >
BinaryOStreamoperator<< (const std::complex< T > &x)
void write (const void *buffer, size_t byteLength)
 write a buffer of bytes to the stream
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

template<typename T >
BinaryOStreamwriteValue (T x)
BinaryOStreamwriteString (const char *string, size_t length)
virtual long doTellp () const =0
virtual void doSeekp (long offset, std::ios_base::seekdir direction)=0
virtual void doFlush ()=0
virtual void doWrite (const void *bytes, size_t numberOfBytes)=0

Detailed Description

base class of binary output streams.

Definition at line 65 of file binary_o_stream.h.


Constructor & Destructor Documentation

lass::io::BinaryOStream::BinaryOStream (  ) 

Definition at line 59 of file binary_o_stream.cpp.

lass::io::BinaryOStream::~BinaryOStream (  ) 

Definition at line 66 of file binary_o_stream.cpp.


Member Function Documentation

long lass::io::BinaryOStream::tellp (  )  const

Definition at line 72 of file binary_o_stream.cpp.

References doTellp().

BinaryOStream & lass::io::BinaryOStream::seekp ( long  position  ) 

Definition at line 79 of file binary_o_stream.cpp.

References doSeekp().

Referenced by lass::io::Image::HeaderIgi::writeTo().

BinaryOStream & lass::io::BinaryOStream::seekp ( long  offset,
std::ios_base::seekdir  direction 
)

Definition at line 87 of file binary_o_stream.cpp.

References doSeekp().

void lass::io::BinaryOStream::flush (  ) 

Definition at line 95 of file binary_o_stream.cpp.

References doFlush().

BinaryOStream & lass::io::BinaryOStream::operator<< ( char  x  ) 

Definition at line 102 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tint8  x  ) 

Definition at line 109 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tuint8  x  ) 

Definition at line 116 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tint16  x  ) 

Definition at line 123 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tuint16  x  ) 

Definition at line 130 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tint32  x  ) 

Definition at line 137 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tuint32  x  ) 

Definition at line 144 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tint64  x  ) 

Definition at line 151 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tuint64  x  ) 

Definition at line 158 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tfloat32  x  ) 

Definition at line 165 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( num::Tfloat64  x  ) 

Definition at line 172 of file binary_o_stream.cpp.

References writeValue().

BinaryOStream & lass::io::BinaryOStream::operator<< ( bool  x  ) 

Definition at line 179 of file binary_o_stream.cpp.

BinaryOStream & lass::io::BinaryOStream::operator<< ( const void *  x  ) 

Definition at line 186 of file binary_o_stream.cpp.

References LASS_META_ASSERT.

BinaryOStream & lass::io::BinaryOStream::operator<< ( const char *  x  ) 

Definition at line 194 of file binary_o_stream.cpp.

References writeString().

BinaryOStream & lass::io::BinaryOStream::operator<< ( const std::string &  x  ) 

Definition at line 201 of file binary_o_stream.cpp.

References writeString().

template<typename T >
BinaryOStream & lass::io::BinaryOStream::operator<< ( const std::vector< T > &  x  )  [inline]

Definition at line 60 of file binary_o_stream.inl.

References LASS_ASSERT.

template<typename T >
BinaryOStream & lass::io::BinaryOStream::operator<< ( const std::complex< T > &  x  )  [inline]

Definition at line 79 of file binary_o_stream.inl.

void lass::io::BinaryOStream::write ( const void *  bytes,
size_t  numBytes 
)

write a buffer of bytes to the stream

Parameters:
bytes pointer to buffer.
numBytes length of buffer in bytes.

Definition at line 212 of file binary_o_stream.cpp.

References doWrite().

Referenced by lass::io::Image::saveRadianceHdr(), lass::io::Image::saveTarga(), lass::io::Image::writeLine(), and lass::io::Image::HeaderRadianceHdr::writeTo().

template<typename T >
BinaryOStream & lass::io::BinaryOStream::writeValue ( x  )  [inline, private]

BinaryOStream & lass::io::BinaryOStream::writeString ( const char *  string,
size_t  length 
) [private]

Definition at line 229 of file binary_o_stream.cpp.

References doWrite(), and LASS_ASSERT.

Referenced by operator<<().

virtual long lass::io::BinaryOStream::doTellp (  )  const [private, pure virtual]

Implemented in lass::io::BinaryOFile, and lass::io::BinaryOSocket.

Referenced by tellp().

virtual void lass::io::BinaryOStream::doSeekp ( long  offset,
std::ios_base::seekdir  direction 
) [private, pure virtual]

Implemented in lass::io::BinaryOFile, and lass::io::BinaryOSocket.

Referenced by seekp().

virtual void lass::io::BinaryOStream::doFlush (  )  [private, pure virtual]

Implemented in lass::io::BinaryOFile, and lass::io::BinaryOSocket.

Referenced by flush().

virtual void lass::io::BinaryOStream::doWrite ( const void *  bytes,
size_t  numberOfBytes 
) [private, pure virtual]

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

Definition at line 75 of file binary_stream_base.h.

Referenced by lass::io::BinaryIStream::readValue(), and writeValue().

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().


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