cinder::msw::ComOStream Class Reference

Wraps a cinder::OStream with a COM IStream. More...

#include <CinderMsw.h>

Inherits cinder::IStream.

List of all members.

Public Types

enum  Endianness { STREAM_BIG_ENDIAN, STREAM_LITTLE_ENDIAN }

Public Member Functions

 ComOStream (cinder::OStreamRef aOStream)
virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID iid, void **ppvObject)
virtual ULONG STDMETHODCALLTYPE AddRef ()
virtual ULONG STDMETHODCALLTYPE Release ()
virtual HRESULT STDMETHODCALLTYPE Read (void *pv, ULONG cb, ULONG *pcbRead)
virtual HRESULT STDMETHODCALLTYPE Write (void const *pv, ULONG cb, ULONG *pcbWritten)
virtual HRESULT STDMETHODCALLTYPE SetSize (ULARGE_INTEGER)
virtual HRESULT STDMETHODCALLTYPE CopyTo (::IStream *, ULARGE_INTEGER, ULARGE_INTEGER *, ULARGE_INTEGER *)
virtual HRESULT STDMETHODCALLTYPE Commit (DWORD)
virtual HRESULT STDMETHODCALLTYPE Revert ()
virtual HRESULT STDMETHODCALLTYPE LockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD)
virtual HRESULT STDMETHODCALLTYPE UnlockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD)
virtual HRESULT STDMETHODCALLTYPE Clone (IStream **)
virtual HRESULT STDMETHODCALLTYPE Seek (LARGE_INTEGER liDistanceToMove, DWORD dwOrigin, ULARGE_INTEGER *lpNewFilePointer)
virtual HRESULT STDMETHODCALLTYPE Stat (STATSTG *pStatstg, DWORD grfStatFlag)
template<typename T >
void read (T *t)
void read (std::string *s)
 Reads characters until a null terminator.
void read (ci::fs::path *p)
template<typename T >
void readEndian (T *t, uint8_t endian)
template<typename T >
void readBig (T *t)
template<typename T >
void readLittle (T *t)
void readFixedString (char *t, size_t maxSize, bool nullTerminate)
void readFixedString (std::string *t, size_t size)
std::string readLine ()
void readData (void *dest, size_t size)
virtual size_t readDataAvailable (void *dest, size_t maxSize)=0
virtual off_t size () const =0
virtual bool isEof () const =0
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.
virtual off_t tell () const =0
 Returns the current position of the stream measured in bytes **/.
virtual void seekAbsolute (off_t absoluteOffset)=0
 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)=0
 Moves the current position of the stream by relativeOffset bytes.

Static Public Member Functions

static uint8_t getNativeEndianness ()

Public Attributes

return STREAM_BIG_ENDIAN

Protected Member Functions

virtual void IORead (void *t, size_t size)=0

Protected Attributes

fs::path mFileName
bool mDeleteOnDestroy

Static Protected Attributes

static const int MINIMUM_BUFFER_SIZE = 8

Detailed Description

Wraps a cinder::OStream with a COM IStream.


Member Enumeration Documentation

Enumerator:
STREAM_BIG_ENDIAN 
STREAM_LITTLE_ENDIAN 

Constructor & Destructor Documentation

cinder::msw::ComOStream::ComOStream ( cinder::OStreamRef  aOStream  ) 

Member Function Documentation

HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::QueryInterface ( REFIID  iid,
void **  ppvObject 
) [virtual]
ULONG STDMETHODCALLTYPE cinder::msw::ComOStream::AddRef (  )  [virtual]
ULONG STDMETHODCALLTYPE cinder::msw::ComOStream::Release (  )  [virtual]
virtual HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::Read ( void *  pv,
ULONG  cb,
ULONG *  pcbRead 
) [virtual]
HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::Write ( void const *  pv,
ULONG  cb,
ULONG *  pcbWritten 
) [virtual]
virtual HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::SetSize ( ULARGE_INTEGER   )  [virtual]
virtual HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::CopyTo ( ::IStream ,
ULARGE_INTEGER  ,
ULARGE_INTEGER *  ,
ULARGE_INTEGER *   
) [virtual]
virtual HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::Commit ( DWORD   )  [virtual]
virtual HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::Revert (  )  [virtual]
virtual HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::LockRegion ( ULARGE_INTEGER  ,
ULARGE_INTEGER  ,
DWORD   
) [virtual]
virtual HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::UnlockRegion ( ULARGE_INTEGER  ,
ULARGE_INTEGER  ,
DWORD   
) [virtual]
virtual HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::Clone ( IStream **   )  [virtual]
HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::Seek ( LARGE_INTEGER  liDistanceToMove,
DWORD  dwOrigin,
ULARGE_INTEGER *  lpNewFilePointer 
) [virtual]
virtual HRESULT STDMETHODCALLTYPE cinder::msw::ComOStream::Stat ( STATSTG *  pStatstg,
DWORD  grfStatFlag 
) [virtual]
template<typename T >
void cinder::IStream::read ( T *  t  )  [inherited]
void cinder::IStream::read ( std::string *  s  )  [inherited]

Reads characters until a null terminator.

void cinder::IStream::read ( ci::fs::path *  p  )  [inherited]
template<typename T >
void cinder::IStream::readEndian ( T *  t,
uint8_t  endian 
) [inherited]
template<typename T >
void cinder::IStream::readBig ( T *  t  )  [inherited]
template<typename T >
void cinder::IStream::readLittle ( T *  t  )  [inherited]
void cinder::IStream::readFixedString ( char *  t,
size_t  maxSize,
bool  nullTerminate 
) [inherited]
void cinder::IStream::readFixedString ( std::string *  t,
size_t  size 
) [inherited]
std::string cinder::IStream::readLine (  )  [inherited]
void cinder::IStream::readData ( void *  dest,
size_t  size 
) [inherited]
virtual size_t cinder::IStream::readDataAvailable ( void *  dest,
size_t  maxSize 
) [pure virtual, inherited]
virtual off_t cinder::IStream::size (  )  const [pure virtual, inherited]
virtual bool cinder::IStream::isEof (  )  const [pure virtual, inherited]
virtual void cinder::IStream::IORead ( void *  t,
size_t  size 
) [protected, pure virtual, 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.

virtual off_t cinder::StreamBase::tell (  )  const [pure virtual, inherited]

Returns the current position of the stream measured in bytes **/.

Implemented in cinder::IStreamFile, cinder::OStreamFile, cinder::IoStreamFile, cinder::IStreamMem, cinder::OStreamMem, and cinder::IStreamUrl.

virtual void cinder::StreamBase::seekAbsolute ( off_t  absoluteOffset  )  [pure virtual, inherited]

Sets the current position of the stream to byte absoluteOffset. A negative offset is relative to the end of the file.

Implemented in cinder::IStreamFile, cinder::OStreamFile, cinder::IoStreamFile, cinder::IStreamMem, cinder::OStreamMem, and cinder::IStreamUrl.

virtual void cinder::StreamBase::seekRelative ( off_t  relativeOffset  )  [pure virtual, inherited]

Moves the current position of the stream by relativeOffset bytes.

Implemented in cinder::IStreamFile, cinder::OStreamFile, cinder::IoStreamFile, cinder::IStreamMem, cinder::OStreamMem, and cinder::IStreamUrl.


Member Data Documentation

const int cinder::IStream::MINIMUM_BUFFER_SIZE = 8 [static, protected, inherited]
fs::path cinder::StreamBase::mFileName [protected, inherited]
bool cinder::StreamBase::mDeleteOnDestroy [protected, inherited]

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