library of assembled shared sources |
http://lass.cocamware.com |
#include <binary_o_file.h>
Public Member Functions | |
BinaryOFile () | |
Construct an "empty" closed file. | |
BinaryOFile (const char *iFileName) | |
Construct stream by filename and open it. | |
BinaryOFile (const std::string &iFileName) | |
Construct stream by filename and open it. | |
~BinaryOFile () | |
Close stream on destruction. | |
void | open (const char *iFileName) |
void | open (const std::string &iFileName) |
void | close () |
bool | is_open () const |
long | tellp () const |
BinaryOStream & | seekp (long position) |
BinaryOStream & | seekp (long offset, std::ios_base::seekdir direction) |
void | flush () |
BinaryOStream & | operator<< (char x) |
BinaryOStream & | operator<< (num::Tint8 x) |
BinaryOStream & | operator<< (num::Tuint8 x) |
BinaryOStream & | operator<< (num::Tint16 x) |
BinaryOStream & | operator<< (num::Tuint16 x) |
BinaryOStream & | operator<< (num::Tint32 x) |
BinaryOStream & | operator<< (num::Tuint32 x) |
BinaryOStream & | operator<< (num::Tint64 x) |
BinaryOStream & | operator<< (num::Tuint64 x) |
BinaryOStream & | operator<< (num::Tfloat32 x) |
BinaryOStream & | operator<< (num::Tfloat64 x) |
BinaryOStream & | operator<< (bool x) |
BinaryOStream & | operator<< (const void *x) |
BinaryOStream & | operator<< (const char *x) |
BinaryOStream & | operator<< (const std::string &x) |
template<typename T > | |
BinaryOStream & | operator<< (const std::vector< T > &x) |
template<typename T > | |
BinaryOStream & | operator<< (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 | |
long | doTellp () const |
void | doSeekp (long iOffset, std::ios_base::seekdir iDirection) |
void | doWrite (const void *iBytes, size_t iNumberOfBytes) |
write a buffer of bytes to the stream | |
void | doFlush () |
Private Attributes | |
FILE * | file_ |
Definition at line 68 of file binary_o_file.h.
lass::io::BinaryOFile::BinaryOFile | ( | ) |
lass::io::BinaryOFile::BinaryOFile | ( | const char * | iFileName | ) |
Construct stream by filename and open it.
Definition at line 69 of file binary_o_file.cpp.
References open().
lass::io::BinaryOFile::BinaryOFile | ( | const std::string & | iFileName | ) |
Construct stream by filename and open it.
Definition at line 80 of file binary_o_file.cpp.
References open().
lass::io::BinaryOFile::~BinaryOFile | ( | ) |
void lass::io::BinaryOFile::open | ( | const char * | iFileName | ) |
Definition at line 98 of file binary_o_file.cpp.
References close(), file_, lass::io::StreamBase::good(), and lass::io::StreamBase::setstate().
Referenced by BinaryOFile(), and open().
void lass::io::BinaryOFile::open | ( | const std::string & | iFileName | ) |
void lass::io::BinaryOFile::close | ( | ) |
Definition at line 120 of file binary_o_file.cpp.
References file_, is_open(), and lass::io::StreamBase::setstate().
Referenced by open(), and ~BinaryOFile().
bool lass::io::BinaryOFile::is_open | ( | ) | const |
long lass::io::BinaryOFile::doTellp | ( | ) | const [private, virtual] |
Implements lass::io::BinaryOStream.
Definition at line 142 of file binary_o_file.cpp.
References file_.
void lass::io::BinaryOFile::doSeekp | ( | long | iOffset, | |
std::ios_base::seekdir | iDirection | |||
) | [private, virtual] |
Implements lass::io::BinaryOStream.
Definition at line 149 of file binary_o_file.cpp.
References file_, LASS_META_ASSERT, and lass::io::StreamBase::setstate().
void lass::io::BinaryOFile::doWrite | ( | const void * | iBytes, | |
size_t | iNumberOfBytes | |||
) | [private, virtual] |
write a buffer of bytes to the stream
Implements lass::io::BinaryOStream.
Definition at line 188 of file binary_o_file.cpp.
References file_, lass::io::StreamBase::good(), and lass::io::StreamBase::setstate().
void lass::io::BinaryOFile::doFlush | ( | ) | [private, virtual] |
Implements lass::io::BinaryOStream.
Definition at line 164 of file binary_o_file.cpp.
References file_, lass::io::StreamBase::good(), and lass::io::StreamBase::setstate().
long lass::io::BinaryOStream::tellp | ( | ) | const [inherited] |
BinaryOStream & lass::io::BinaryOStream::seekp | ( | long | position | ) | [inherited] |
Definition at line 79 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::doSeekp().
Referenced by lass::io::Image::HeaderIgi::writeTo().
BinaryOStream & lass::io::BinaryOStream::seekp | ( | long | offset, | |
std::ios_base::seekdir | direction | |||
) | [inherited] |
void lass::io::BinaryOStream::flush | ( | ) | [inherited] |
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | char | x | ) | [inherited] |
Definition at line 102 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tint8 | x | ) | [inherited] |
Definition at line 109 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tuint8 | x | ) | [inherited] |
Definition at line 116 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tint16 | x | ) | [inherited] |
Definition at line 123 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tuint16 | x | ) | [inherited] |
Definition at line 130 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tint32 | x | ) | [inherited] |
Definition at line 137 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tuint32 | x | ) | [inherited] |
Definition at line 144 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tint64 | x | ) | [inherited] |
Definition at line 151 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tuint64 | x | ) | [inherited] |
Definition at line 158 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tfloat32 | x | ) | [inherited] |
Definition at line 165 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | num::Tfloat64 | x | ) | [inherited] |
Definition at line 172 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeValue().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | bool | x | ) | [inherited] |
Definition at line 179 of file binary_o_stream.cpp.
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | const void * | x | ) | [inherited] |
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | const char * | x | ) | [inherited] |
Definition at line 194 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeString().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | const std::string & | x | ) | [inherited] |
Definition at line 201 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::writeString().
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | const std::vector< T > & | x | ) | [inline, inherited] |
BinaryOStream & lass::io::BinaryOStream::operator<< | ( | const std::complex< T > & | x | ) | [inline, inherited] |
Definition at line 79 of file binary_o_stream.inl.
void lass::io::BinaryOStream::write | ( | const void * | bytes, | |
size_t | numBytes | |||
) | [inherited] |
write a buffer of bytes to the stream
bytes | pointer to buffer. | |
numBytes | length of buffer in bytes. |
Definition at line 212 of file binary_o_stream.cpp.
References lass::io::BinaryOStream::doWrite().
Referenced by lass::io::Image::saveRadianceHdr(), lass::io::Image::saveTarga(), lass::io::Image::writeLine(), and lass::io::Image::HeaderRadianceHdr::writeTo().
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 lass::io::BinaryOStream::writeValue().
void lass::io::BinaryStreamBase::setEndianness | ( | num::Endianness | iEndianness | ) | [inline, inherited] |
Definition at line 76 of file binary_stream_base.h.
Referenced by lass::io::EndiannessSetter::EndiannessSetter(), and lass::io::EndiannessSetter::~EndiannessSetter().
const bool lass::io::StreamBase::good | ( | ) | const [inline, inherited] |
Definition at line 76 of file stream_base.h.
Referenced by doFlush(), lass::io::BinaryISocket::doRead(), lass::io::BinaryIMemoryMap::doRead(), lass::io::BinaryIMemoryBlock::doRead(), lass::io::BinaryIFile::doRead(), lass::io::BinaryIMemoryMap::doSeekg(), lass::io::BinaryOSocket::doWrite(), doWrite(), lass::io::Image::open(), open(), lass::io::BinaryIStream::operator>>(), lass::io::Image::HeaderPfm::readFrom(), lass::io::Image::HeaderRadianceHdr::readFrom(), lass::io::Image::readLine(), lass::io::BinaryIStream::readValue(), and lass::io::Image::save().
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] |
void lass::io::StreamBase::clear | ( | std::ios_base::iostate | iState = std::ios_base::goodbit |
) | [inline, inherited] |
Definition at line 81 of file stream_base.h.
Referenced by lass::io::XmlOFile::close(), lass::io::XmlOFile::open(), and lass::io::XmlOElement::XmlOElement().
void lass::io::StreamBase::setstate | ( | std::ios_base::iostate | iState | ) | [inline, inherited] |
Definition at line 82 of file stream_base.h.
Referenced by close(), lass::io::BinaryIFile::close(), doFlush(), lass::io::BinaryISocket::doRead(), lass::io::BinaryIMemoryMap::doRead(), lass::io::BinaryIMemoryBlock::doRead(), lass::io::BinaryIFile::doRead(), lass::io::BinaryIMemoryMap::doSeekg(), lass::io::BinaryIFile::doSeekg(), doSeekp(), doWrite(), lass::io::BinaryOSocket::flusher(), open(), lass::io::BinaryIMemoryMap::open(), and lass::io::BinaryIFile::open().
lass::io::StreamBase::operator num::SafeBool | ( | ) | const [inline, inherited] |
Definition at line 83 of file stream_base.h.
References lass::io::StreamBase::fail(), lass::num::safeFalse, and lass::num::safeTrue.
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] |
FILE* lass::io::BinaryOFile::file_ [private] |
Generated on Mon Nov 10 14:22:09 2008 for Library of Assembled Shared Sources by 1.5.7.1 |