Base Framework
Public Member Functions | List of all members
PushInterface Class Referenceabstract

Push interface. More...

#include <base/io/PushInterface.h>

Inherited by Adler32, CRC32, Deflater [virtual], Inflater [virtual], MD5Sum, OrbConnection, SHA1, SHA256, SHA384, and SHA512.

Public Member Functions

virtual void flush ()
 
virtual bool pushBegin (uint64 totalSize)
 
virtual MemorySize push (const uint8 *buffer, MemorySize size)=0
 
virtual void pushEnd ()
 

Detailed Description

Push interface.

Low-level push interface for in-memory IO.

Version
1.0
Examples
testsuite/http.cpp.

Member Function Documentation

◆ flush()

virtual void PushInterface::flush ( )
virtual

Forces any buffered bytes to be written out. This method is ignored by unbuffered streams.

Reimplemented in Deflater, BZip2Deflater, and ZLibDeflater.

◆ push()

virtual MemorySize PushInterface::push ( const uint8 *  buffer,
MemorySize  size 
)
pure virtual

Pushes the specified number of bytes onto the stream.

Parameters
bufferThe buffer containing the bytes to be pushed.
sizeThe number of bytes to be pushed.
Returns
The number of bytes pushed.

Implemented in CRC32, Adler32, SHA256, SHA512, SHA384, SHA1, BZip2Deflater, ZLibDeflater, BZip2Inflater, ZLibInflater, MD5Sum, and LocalConnection.

Examples
testsuite/http.cpp.

◆ pushBegin()

virtual bool PushInterface::pushBegin ( uint64  totalSize)
virtual

Begins the pushes.

Parameters
totalSizeThe total number of bytes to be pushed.
Examples
testsuite/http.cpp.

◆ pushEnd()

virtual void PushInterface::pushEnd ( )
virtual

This method should be invoked when the end has been reached. This method may be ignored by some implementations.

Reimplemented in SHA256, SHA512, SHA384, SHA1, CRC32, BZip2Deflater, ZLibDeflater, BZip2Inflater, ZLibInflater, MD5Sum, and LocalConnection.

Examples
testsuite/digest.cpp, and testsuite/http.cpp.