#include <Stream.h>
Inherits cinder::OStream.
Public Types | |
enum | Endianness { STREAM_BIG_ENDIAN, STREAM_LITTLE_ENDIAN } |
Public Member Functions | |
~OStreamMem () | |
virtual off_t | tell () const |
Returns the current position of the stream measured in bytes **/. | |
virtual void | seekAbsolute (off_t absoluteOffset) |
Sets the current position of the stream to byte absoluteOffset. A negative offset is relative to the end of the file. | |
virtual void | seekRelative (off_t relativeOffset) |
Moves the current position of the stream by relativeOffset bytes. | |
void * | getBuffer () |
void | write (const std::string &s) |
Writes null-terminated string, including terminator. | |
void | write (const ci::fs::path &p) |
template<typename T > | |
void | write (T t) |
void | write (const Buffer &buffer) |
template<typename T > | |
void | writeEndian (T t, uint8_t endian) |
template<typename T > | |
void | writeBig (T t) |
template<typename T > | |
void | writeLittle (T t) |
void | writeData (const void *src, size_t size) |
const fs::path & | getFileName () const |
Returns the file name of the path from which a Stream originated when relevant. Empty string when undefined. | |
void | setFileName (const fs::path &aFileName) |
Sets the file name of the path from which a Stream originated when relevant. Empty string when undefined. | |
bool | getDeleteOnDestroy () const |
Returns whether the Stream has been requested to destroy its source upon its own destruction. For example, IStreamFile will delete its source file. Ignored in some types of streams. Defaults to false . | |
void | setDeleteOnDestroy (bool enable=true) |
Sets whether the Stream has been requested to destroy its source upon its own destruction. For example, IStreamFile will delete its source file. Ignored in some types of streams. Defaults to false . | |
Static Public Member Functions | |
static OStreamMemRef | create (size_t bufferSizeHint=4096) |
static uint8_t | getNativeEndianness () |
Public Attributes | |
return | STREAM_BIG_ENDIAN |
Protected Member Functions | |
OStreamMem (size_t bufferSizeHint) | |
virtual void | IOWrite (const void *t, size_t size) |
Protected Attributes | |
void * | mBuffer |
size_t | mDataSize |
size_t | mOffset |
fs::path | mFileName |
bool | mDeleteOnDestroy |
enum cinder::StreamBase::Endianness [inherited] |
cinder::OStreamMem::OStreamMem | ( | size_t | bufferSizeHint | ) | [protected] |
static OStreamMemRef cinder::OStreamMem::create | ( | size_t | bufferSizeHint = 4096 | ) | [static] |
virtual off_t cinder::OStreamMem::tell | ( | ) | const [virtual] |
Returns the current position of the stream measured in bytes **/.
Implements cinder::StreamBase.
void cinder::OStreamMem::seekAbsolute | ( | off_t | absoluteOffset | ) | [virtual] |
Sets the current position of the stream to byte absoluteOffset. A negative offset is relative to the end of the file.
Implements cinder::StreamBase.
void cinder::OStreamMem::seekRelative | ( | off_t | relativeOffset | ) | [virtual] |
Moves the current position of the stream by relativeOffset bytes.
Implements cinder::StreamBase.
void* cinder::OStreamMem::getBuffer | ( | ) |
void cinder::OStreamMem::IOWrite | ( | const void * | t, |
size_t | size | ||
) | [protected, virtual] |
Implements cinder::OStream.
void cinder::OStream::write | ( | const std::string & | s | ) | [inherited] |
Writes null-terminated string, including terminator.
void cinder::OStream::write | ( | const ci::fs::path & | p | ) | [inherited] |
void cinder::OStream::write | ( | T | t | ) | [inherited] |
void cinder::OStream::write | ( | const Buffer & | buffer | ) | [inherited] |
void cinder::OStream::writeEndian | ( | T | t, |
uint8_t | endian | ||
) | [inherited] |
void cinder::OStream::writeBig | ( | T | t | ) | [inherited] |
void cinder::OStream::writeLittle | ( | T | t | ) | [inherited] |
void cinder::OStream::writeData | ( | const void * | src, |
size_t | size | ||
) | [inherited] |
static uint8_t cinder::StreamBase::getNativeEndianness | ( | ) | [static, inherited] |
Returns the platform's endianness as a StreamBase::Endianness
const fs::path& cinder::StreamBase::getFileName | ( | ) | const [inherited] |
Returns the file name of the path from which a Stream originated when relevant. Empty string when undefined.
void cinder::StreamBase::setFileName | ( | const fs::path & | aFileName | ) | [inherited] |
Sets the file name of the path from which a Stream originated when relevant. Empty string when undefined.
bool cinder::StreamBase::getDeleteOnDestroy | ( | ) | const [inherited] |
Returns whether the Stream has been requested to destroy its source upon its own destruction. For example, IStreamFile will delete its source file. Ignored in some types of streams. Defaults to false
.
void cinder::StreamBase::setDeleteOnDestroy | ( | bool | enable = true | ) | [inherited] |
Sets whether the Stream has been requested to destroy its source upon its own destruction. For example, IStreamFile will delete its source file. Ignored in some types of streams. Defaults to false
.
void* cinder::OStreamMem::mBuffer [protected] |
size_t cinder::OStreamMem::mDataSize [protected] |
size_t cinder::OStreamMem::mOffset [protected] |
return cinder::StreamBase::STREAM_BIG_ENDIAN [inherited] |
fs::path cinder::StreamBase::mFileName [protected, inherited] |
bool cinder::StreamBase::mDeleteOnDestroy [protected, inherited] |