DWFCore::DWFFileOutputStream Class Reference

#include "dwfcore/FileOutputStream.h"

Inheritance diagram for DWFCore::DWFFileOutputStream:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

An output stream object that provides streaming write functionality to a file descriptor.

Since:
1.0.1
Examples:

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

Definition at line 44 of file FileOutputStream.h.

Public Member Functions

_DWFCORE_API DWFFileOutputStream () throw ()
virtual _DWFCORE_API ~DWFFileOutputStream () throw ()
_DWFCORE_API void attach (DWFFileDescriptor *pFileDescriptor, bool bOwnDescriptor) throw ( DWFException )
_DWFCORE_API void detach () throw ( DWFException )
_DWFCORE_API void flush () throw ( DWFException )
_DWFCORE_API size_t write (const void *pBuffer, size_t nBytesToWrite) throw ( DWFException )
_DWFCORE_API const DWFFileDescriptordescriptor () const throw ()


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFFileOutputStream::DWFFileOutputStream  )  throw ()
 

Constructor

Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFCORE_API void DWFCore::DWFFileOutputStream::attach DWFFileDescriptor pFileDescriptor,
bool  bOwnDescriptor
throw ( DWFException )
 

Binds this stream to the file descriptor.

Parameters:
pFileDescriptor A file descriptor from which to stream the source data. This object should be allocated with the DWFCORE_ALLOC_OBJECT macro if ownership will be transferred.
bOwnDescriptor If true, this object will assume ownership of pFileDescriptor and delete it as necessary using DWFCORE_FREE_OBJECT. If false, the caller retains ownership of pFileDescriptor and is responsible for deleting it.
Exceptions:
DWFException 
Examples:
Digest/main.cpp, Files/Files.cpp, and Strings/Strings.cpp.

_DWFCORE_API const DWFFileDescriptor* DWFCore::DWFFileOutputStream::descriptor  )  const throw () [inline]
 

Returns the file descriptor to which this stream is bound.

Returns:
The file descriptor.
Exceptions:
DWFException 

Definition at line 122 of file FileOutputStream.h.

_DWFCORE_API void DWFCore::DWFFileOutputStream::detach  )  throw ( DWFException )
 

Unbinds this stream from a previously bound file descriptor.

Exceptions:
DWFException 
Examples:
Files/Files.cpp.

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

Flushes any remaining bytes from the stream into the file descriptor.

Exceptions:
DWFException 

Implements DWFCore::DWFOutputStream.

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

Writes at most nBytesToWrite into the stream from the buffer provided.

Parameters:
pBuffer A pointer to a block of memory whose data will be written into the stream.
nBytesToWrite The number of bytes to copy from pBuffer.
Returns:
The number of bytes actually written.
Exceptions:
DWFException 

Implements DWFCore::DWFOutputStream.

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


The documentation for this class 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