Fabcoin Core  0.16.2
P2P Digital Currency
Private Member Functions | List of all members
CustomFlushPropagation< T > Class Template Referenceabstract

Interface for custom flush signals propagation. More...

#include <simple.h>

Inheritance diagram for CustomFlushPropagation< T >:
[legend]
Collaboration diagram for CustomFlushPropagation< T >:
[legend]

Public Member Functions

SIGNALS
virtual bool Flush (bool hardFlush, int propagation=-1, bool blocking=true)=0
 Flush buffered input and/or output, with signal propagation. More...
 

Private Member Functions

bool IsolatedFlush (bool hardFlush, bool blocking)
 

Detailed Description

template<class T>
class CustomFlushPropagation< T >

Interface for custom flush signals propagation.

Template Parameters
TBufferedTransformation derived class

Definition at line 159 of file simple.h.

Member Function Documentation

template<class T>
virtual bool CustomFlushPropagation< T >::Flush ( bool  hardFlush,
int  propagation = -1,
bool  blocking = true 
)
pure virtual

Flush buffered input and/or output, with signal propagation.

Parameters
hardFlushis used to indicate whether all data should be flushed
propagationthe number of attached transformations the Flush() signal should be passed
blockingspecifies whether the object should block when processing input

propagation count includes this object. Setting propagation to 1 means this object only. Setting propagation to -1 means unlimited propagation.

Note
Hard flushes must be used with care. It means try to process and output everything, even if there may not be enough data to complete the action. For example, hard flushing a HexDecoder would cause an error if you do it after inputing an odd number of hex encoded characters.
For some types of filters, like ZlibDecompressor, hard flushes can only be done at "synchronization points". These synchronization points are positions in the data stream that are created by hard flushes on the corresponding reverse filters, in this example ZlibCompressor. This is useful when zlib compressed data is moved across a network in packets and compression state is preserved across packets, as in the SSH2 protocol.

Implemented in OutputProxy, Redirector, Multichannel< T >, Multichannel< Filter >, Multichannel< Sink >, InformationDispersal, Unflushable< Multichannel< Filter > >, and SecretSharing.

template<class T>
bool CustomFlushPropagation< T >::IsolatedFlush ( bool  hardFlush,
bool  blocking 
)
inlineprivate

Definition at line 184 of file simple.h.


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