DWFCore::DWFStreamOutputBufferDescriptor Class Reference

#include "dwfcore/StreamOutputBufferDescriptor.h"

Inheritance diagram for DWFCore::DWFStreamOutputBufferDescriptor:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFStreamOutputBufferDescriptor:

Collaboration graph
[legend]
List of all members.

Detailed Description

This provides a descriptor interface to an output buffer.

Since:
1.3.0
This class provides the file descriptor interface to a output buffer.

Definition at line 53 of file StreamOutputBufferDescriptor.h.

Public Types

enum  teReadWriteMode

Public Member Functions

_DWFCORE_API DWFStreamOutputBufferDescriptor (size_t nInitialBytes=16384) throw ()
virtual _DWFCORE_API ~DWFStreamOutputBufferDescriptor () throw ()
_DWFCORE_API void open () throw ( DWFException )
_DWFCORE_API void close () throw ( DWFException )
_DWFCORE_API void reset () throw ()
_DWFCORE_API size_t size () throw ( DWFException )
_DWFCORE_API size_t read (void *pBuffer, size_t nBytesToRead) throw ( DWFException )
_DWFCORE_API off_t seek (int eOrigin, off_t nOffset) throw ( DWFException )
_DWFCORE_API size_t write (const void *pBuffer, size_t nBytesToWrite) throw ( DWFException )
virtual _DWFCORE_API void flush () throw ( DWFException )
_DWFCORE_API const unsigned
char * 
buffer () throw ()


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFStreamOutputBufferDescriptor::DWFStreamOutputBufferDescriptor size_t  nInitialBytes = 16384  )  throw ()
 

Constructor

Parameters:
nInitialBytes The initial size of the buffer. This will grow as needed.
Exceptions:
None 

virtual _DWFCORE_API DWFCore::DWFStreamOutputBufferDescriptor::~DWFStreamOutputBufferDescriptor  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFCORE_API const unsigned char* DWFCore::DWFStreamOutputBufferDescriptor::buffer  )  throw () [inline]
 

This provides read-only access to the underlying buffer.

Returns:
A const pointer to the buffer.
Exceptions:
None. 

Definition at line 178 of file StreamOutputBufferDescriptor.h.

_DWFCORE_API void DWFCore::DWFStreamOutputBufferDescriptor::close  )  throw ( DWFException ) [virtual]
 

Performs an close operation on the associated file within the context of the descriptor implementation.

Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.

virtual _DWFCORE_API void DWFCore::DWFStreamOutputBufferDescriptor::flush  )  throw ( DWFException ) [virtual]
 

Performs a flush operation on the associated data within the context of the descriptor implementation.

Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.

_DWFCORE_API void DWFCore::DWFStreamOutputBufferDescriptor::open  )  throw ( DWFException ) [virtual]
 

Performs an open operation on the associated file within the context of the descriptor implementation.

Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.

_DWFCORE_API size_t DWFCore::DWFStreamOutputBufferDescriptor::read void *  pBuffer,
size_t  nBytesToRead
throw ( DWFException ) [virtual]
 

Performs a read operation on the associated data within the context of the descriptor implementation. For this class this always throws an exception.

Parameters:
pBuffer A pointer to a block of memory to receive the bytes. Any implementation receiving a NULL buffer pointer should throw a DWFInvalidArgumentException.
nBytesToRead The number of bytes to copy into pBuffer. This value should not exceed the capacity of the memory block at pBuffer.
Returns:
The number of actual bytes read.
Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.

_DWFCORE_API void DWFCore::DWFStreamOutputBufferDescriptor::reset  )  throw ()
 

This clears out the buffer and prepares it for new output.

Exceptions:
None 

_DWFCORE_API off_t DWFCore::DWFStreamOutputBufferDescriptor::seek int  eOrigin,
off_t  nOffset
throw ( DWFException ) [virtual]
 

Performs a seek operation on the associated data within the context of the descriptor implementation. This is valid only for eRead mode.

Parameters:
eOrigin One of SEEK_SET, SEEK_CUR or SEEK_END.
nOffset The number of bytes from eOrigin to move the internal cursor.
Returns:
The previous cursor offset before the seek.
Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.

_DWFCORE_API size_t DWFCore::DWFStreamOutputBufferDescriptor::size  )  throw ( DWFException ) [virtual]
 

Returns the size of the associated file, in bytes, within the context of the descriptor implementation.

Returns:
The size of the file, in bytes.
Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.

_DWFCORE_API size_t DWFCore::DWFStreamOutputBufferDescriptor::write const void *  pBuffer,
size_t  nBytesToWrite
throw ( DWFException ) [virtual]
 

Performs a write operation on the associated buffer within the context of the descriptor implementation.

Parameters:
pBuffer A pointer to a block of memory whose data will be written into the stream. Any implementation receiving a NULL buffer pointer should throw a DWFInvalidArgumentException.
nBytesToWrite The number of bytes to copy from pBuffer.
Returns:
The number of bytes actually written.
Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:42 2009 for Autodesk DWF Core Library by  doxygen 1.4.5