Public Member Functions | Protected Attributes

de::softpro::doc::OutputStream Class Reference

Interface for an output stream, inspired by Java's java.io.OutputStream. More...

#include <SignDocSDK-cpp.h>

Inheritance diagram for de::softpro::doc::OutputStream:
de::softpro::doc::LibraryOutputStream de::softpro::doc::UserOutputStream de::softpro::doc::FileOutputStream de::softpro::doc::MemoryOutputStream

Public Member Functions

 OutputStream (SIGNDOC_OutputStream *aImpl)
 Constructor.
virtual ~OutputStream ()
 Destructor.
virtual void close ()=0
 Close the stream.
virtual void flush ()=0
 Flush the stream.
virtual void seek (int aPos)=0
 Seek to the specified position.
virtual int tell () const =0
 Retrieve the current position.
virtual void write (const void *aSrc, int aLen)=0
 Write octets to the stream.
SIGNDOC_OutputStream * getImpl ()
 Internal.

Protected Attributes

SIGNDOC_OutputStream * p
 Pointer to C structure.

Detailed Description

Interface for an output stream, inspired by Java's java.io.OutputStream.

If you want to implement your own OutputStream implementation, derive your class from UserOutputStream.


Constructor & Destructor Documentation

de::softpro::doc::OutputStream::OutputStream ( SIGNDOC_OutputStream *  aImpl ) [inline]

Constructor.

Parameters:
[in]aImplA pointer to the C structure.
virtual de::softpro::doc::OutputStream::~OutputStream (  ) [inline, virtual]

Destructor.


Member Function Documentation

virtual void de::softpro::doc::OutputStream::close (  ) [pure virtual]

Close the stream.

This function forces any buffered data to be written and closes the stream.

You should not write to the stream after calling this function.

Implementations of this class may define exceptions thrown by this function.

Implemented in de::softpro::doc::LibraryOutputStream.

virtual void de::softpro::doc::OutputStream::flush (  ) [pure virtual]

Flush the stream.

This function forces any buffered data to be written.

Implementations of this class may define exceptions thrown by this function.

Implemented in de::softpro::doc::LibraryOutputStream.

SIGNDOC_OutputStream* de::softpro::doc::OutputStream::getImpl (  ) [inline]

Internal.

virtual void de::softpro::doc::OutputStream::seek ( int  aPos ) [pure virtual]

Seek to the specified position.

Throws an exception if the position is invalid or if seeking is not supported.

Parameters:
[in]aPosThe position (the first octet is at position zero).

Implemented in de::softpro::doc::LibraryOutputStream.

virtual int de::softpro::doc::OutputStream::tell (  ) const [pure virtual]

Retrieve the current position.

Throws an exception if the position cannot represented as non-negative int or if seeking is not supported.

Returns:
The current position (the first octet is at position zero)

Implemented in de::softpro::doc::LibraryOutputStream.

virtual void de::softpro::doc::OutputStream::write ( const void *  aSrc,
int  aLen 
) [pure virtual]

Write octets to the stream.

Throws an exception on error.

Parameters:
[in]aSrcPointer to buffer to be written.
[in]aLenNumber of octets to write.

Implemented in de::softpro::doc::LibraryOutputStream.


Field Documentation

SIGNDOC_OutputStream* de::softpro::doc::OutputStream::p [protected]

Pointer to C structure.


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