DWFCore::DWFFileDescriptor Interface Reference

#include "dwfcore/FileDescriptor.h"

Inheritance diagram for DWFCore::DWFFileDescriptor:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Interface for file description and control.

Since:
1.0.1
This interface is intended as a common way to interact with any type of file in just about any way. Implementations may simply wrap standard runtime behavior (e.g. DWFStreamFileDescriptor) or may integrate type-specific functionality (e.g. DWFZipFileDescriptor.)

Definition at line 47 of file FileDescriptor.h.

Public Member Functions

_DWFCORE_API DWFFileDescriptor (const DWFFile &rFile) throw ()
virtual _DWFCORE_API ~DWFFileDescriptor () throw ()
_DWFCORE_API const DWFFilefile () const throw ()
virtual _DWFCORE_API void open ()=0 throw ( DWFException )
virtual _DWFCORE_API void close ()=0 throw ( DWFException )
virtual _DWFCORE_API size_t size ()=0 throw ( DWFException )
virtual _DWFCORE_API size_t read (void *pBuffer, size_t nBytesToRead) throw ( DWFException )
virtual _DWFCORE_API off_t seek (int eOrigin, off_t nOffset) throw ( DWFException )
virtual _DWFCORE_API size_t write (const void *pBuffer, size_t nBytesToWrite) throw ( DWFException )
virtual _DWFCORE_API void flush ()

Protected Attributes

DWFFile _oFile


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFFileDescriptor::DWFFileDescriptor const DWFFile rFile  )  throw () [inline]
 

Constructor

Parameters:
rFile The file to associate with this descriptor. This object will be copied locally.
Exceptions:
None 

Definition at line 60 of file FileDescriptor.h.

virtual _DWFCORE_API DWFCore::DWFFileDescriptor::~DWFFileDescriptor  )  throw () [inline, virtual]
 

Destructor

Exceptions:
None 

Definition at line 71 of file FileDescriptor.h.


Member Function Documentation

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

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

Exceptions:
DWFException 

Implemented in DWFCore::DWFStreamFileDescriptor, DWFCore::DWFStreamOutputBufferDescriptor, DWFCore::DWFZipFileDescriptor, DWFCore::DWFStandardFileDescriptor, and DWFCore::DWFStandardFileDescriptor.

_DWFCORE_API const DWFFile& DWFCore::DWFFileDescriptor::file  )  const throw () [inline]
 

Returns the file associated with this descriptor.

Returns:
The file.
Exceptions:
None 
Examples:
Files/Files.cpp.

Definition at line 82 of file FileDescriptor.h.

virtual _DWFCORE_API void DWFCore::DWFFileDescriptor::flush  )  [inline, virtual]
 

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

Note:
This method may not be supported by all descriptors.
Warning:
This method is not implemented and will always throw an exception if invoked.
Exceptions:
DWFException 

Implemented in DWFCore::DWFStreamFileDescriptor, DWFCore::DWFStreamOutputBufferDescriptor, DWFCore::DWFStandardFileDescriptor, and DWFCore::DWFStandardFileDescriptor.

Definition at line 200 of file FileDescriptor.h.

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

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

Exceptions:
DWFException 

Implemented in DWFCore::DWFStreamFileDescriptor, DWFCore::DWFStreamOutputBufferDescriptor, DWFCore::DWFZipFileDescriptor, DWFCore::DWFStandardFileDescriptor, and DWFCore::DWFStandardFileDescriptor.

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

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

Note:
This method may not be supported by all descriptors.
Warning:
This method is not implemented and will always throw an exception if invoked.
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 

Implemented in DWFCore::DWFStreamFileDescriptor, DWFCore::DWFStreamOutputBufferDescriptor, DWFCore::DWFZipFileDescriptor, DWFCore::DWFStandardFileDescriptor, and DWFCore::DWFStandardFileDescriptor.

Definition at line 135 of file FileDescriptor.h.

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

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

Note:
This method may not be supported by all descriptors.
Warning:
This method is not implemented and will always throw an exception if invoked.
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 

Implemented in DWFCore::DWFStreamFileDescriptor, DWFCore::DWFStreamOutputBufferDescriptor, DWFCore::DWFZipFileDescriptor, DWFCore::DWFStandardFileDescriptor, and DWFCore::DWFStandardFileDescriptor.

Definition at line 157 of file FileDescriptor.h.

virtual _DWFCORE_API size_t DWFCore::DWFFileDescriptor::size  )  throw ( DWFException ) [pure 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 

Implemented in DWFCore::DWFStreamFileDescriptor, DWFCore::DWFStreamOutputBufferDescriptor, DWFCore::DWFZipFileDescriptor, DWFCore::DWFStandardFileDescriptor, and DWFCore::DWFStandardFileDescriptor.

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

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

Note:
This method may not be supported by all descriptors.
Warning:
This method is not implemented and will always throw an exception if invoked.
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 

Implemented in DWFCore::DWFStreamFileDescriptor, DWFCore::DWFStreamOutputBufferDescriptor, DWFCore::DWFStandardFileDescriptor, and DWFCore::DWFStandardFileDescriptor.

Definition at line 181 of file FileDescriptor.h.


Member Data Documentation

DWFFile DWFCore::DWFFileDescriptor::_oFile [protected]
 

The associated file.

Definition at line 210 of file FileDescriptor.h.


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