InputRejecting< T > Class Template Reference

Base class for input rejecting filters. More...

`#include <simple.h>`

Inheritance diagram for InputRejecting< T >:

## Classes

struct | InputRejected

## Public Member Functions

INPUT
size_t | Put2 (const byte *inString, size_t length, int messageEnd, bool blocking)
| Input a byte array for processing.
SIGNALS
bool | IsolatedFlush (bool hardFlush, bool blocking)
| Flushes data buffered by this object, without signal propagation.
bool | IsolatedMessageSeriesEnd (bool blocking)
| Marks the end of a series of messages, without signal propagation.
size_t | ChannelPut2 (const std::string &channel, const byte *inString, size_t length, int messageEnd, bool blocking)
| Input multiple bytes for processing on a channel.
bool | ChannelMessageSeriesEnd (const std::string &channel, int messageEnd, bool blocking)
| Marks the end of a series of messages on a channel.

## Detailed Description

template<class T>
class InputRejecting< T >

Base class for input rejecting filters.

Template Parameters

  T | the class or type

T should be a BufferedTransformation derived class

Definition at line 194 of file simple.h.

## Member Function Documentation

## Put2()

template<class T >

size_t InputRejecting< T >::Put2 | ( | const byte * | inString,
|  | size_t | length,
|  | int | messageEnd,
|  | bool | blocking
| ) |  |

inline

Input a byte array for processing.

Parameters

  inString | the byte array to process
  length | the size of the string, in bytes
  messageEnd | means how many filters to signal MessageEnd() to, including this one
  blocking | specifies whether the object should block when processing input

Exceptions

  InputRejected |

Returns
  the number of bytes that remain to be processed (i.e., bytes not processed)

Internally, the default implementation throws InputRejected.

Definition at line 211 of file simple.h.

## IsolatedFlush()

template<class T >

bool InputRejecting< T >::IsolatedFlush | ( | bool | hardFlush,
|  | bool | blocking
| ) |  |

inline

Flushes data buffered by this object, without signal propagation.

Parameters

  hardFlush | indicates whether all data should be flushed
  blocking | specifies whether the object should block when processing input

Note
  hardFlush must be used with care

Definition at line 222 of file simple.h.

## IsolatedMessageSeriesEnd()

template<class T >

bool InputRejecting< T >::IsolatedMessageSeriesEnd | ( | bool | blocking | ) |

inline

Marks the end of a series of messages, without signal propagation.

Parameters

  blocking | specifies whether the object should block when completing the processing on the current series of messages

Returns
  true if the message was successful, false otherwise

Definition at line 229 of file simple.h.

## ChannelPut2()

template<class T >

size_t InputRejecting< T >::ChannelPut2 | ( | const std::string & | channel,
|  | const byte * | inString,
|  | size_t | length,
|  | int | messageEnd,
|  | bool | blocking
| ) |  |

inline

Input multiple bytes for processing on a channel.

Parameters

  channel | the channel to process the data.
  inString | the byte buffer to process.
  length | the size of the string, in bytes.
  messageEnd | means how many filters to signal MessageEnd() to, including this one.
  blocking | specifies whether the object should block when processing input.

Returns
  the number of bytes that remain to be processed (i.e., bytes not processed)

Definition at line 239 of file simple.h.

## ChannelMessageSeriesEnd()

template<class T >

bool InputRejecting< T >::ChannelMessageSeriesEnd | ( | const std::string & | channel,
|  | int | messageEnd,
|  | bool | blocking
| ) |  |

inline

Marks the end of a series of messages on a channel.

Parameters

  channel | the channel to signal the end of a series of messages
  messageEnd | the number of attached transformations the ChannelMessageSeriesEnd() signal should be passed
  blocking | specifies whether the object should block when processing input

Returns
  true if the message was successful, false otherwise

Each object that receives the signal will perform its processing, decrement propagation, and then pass the signal on to attached transformations if the value is not 0.

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

Note
  There should be a MessageEnd() immediately before MessageSeriesEnd().

Definition at line 253 of file simple.h.

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

- simple.h