DWFCore::DWFStreamFileDescriptor Class Reference
[Platform-specific Class and Function Definitions]

#include "dwfcore/StreamFileDescriptor.h"

Inheritance diagram for DWFCore::DWFStreamFileDescriptor:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Descriptor implementing file stream access and control.

Since:
1.0.1
This class provides access and control to a disk file using the standard c runtime file stream API.

Note:
This class has platform-specific implementations.
Examples:

Digest/main.cpp, Files/Files.cpp, and Strings/Strings.cpp.

Definition at line 51 of file StreamFileDescriptor.h.

Public Member Functions

_DWFCORE_API DWFStreamFileDescriptor (const DWFFile &rFile, const DWFString &zStreamIOFlags) throw ()
virtual _DWFCORE_API ~DWFStreamFileDescriptor () throw ()
_DWFCORE_API void open () throw ( DWFException )
_DWFCORE_API void close () throw ( DWFException )
_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 )


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFStreamFileDescriptor::DWFStreamFileDescriptor const DWFFile rFile,
const DWFString zStreamIOFlags
throw ()
 

Constructor

Parameters:
rFile The file on which this descriptor will operate.
zStreamIOFlags The same flags that can be passed to fopen() that set the file mode should be used here.
Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

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

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

Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.

Examples:
Files/Files.cpp.

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

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

Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.

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

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

Exceptions:
DWFException 

Implements DWFCore::DWFFileDescriptor.

Examples:
Digest/main.cpp, Files/Files.cpp, and Strings/Strings.cpp.

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

Performs a read operation on the associated file within the context of the descriptor implementation.

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 off_t DWFCore::DWFStreamFileDescriptor::seek int  eOrigin,
off_t  nOffset
throw ( DWFException ) [virtual]
 

Performs a seek operation on the associated file within the context of the descriptor implementation.

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::DWFStreamFileDescriptor::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::DWFStreamFileDescriptor::write const void *  pBuffer,
size_t  nBytesToWrite
throw ( DWFException ) [virtual]
 

Performs a write operation on the associated file 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