Loading...
Searching...
No Matches
websocketpp::utf8_validator::validator Class Reference

Provides streaming UTF8 validation functionality. More...

`#include <utf8_validator.hpp>`

## Public Member Functions

| validator ()
| Construct and initialize the validator.
bool | consume (uint8_t byte)
| Advance the state of the validator with the next input byte.
template<typename iterator_type>
bool | decode (iterator_type begin, iterator_type end)
| Advance validator state with input from an iterator pair.
bool | complete ()
| Return whether the input sequence ended on a valid utf8 codepoint.
void | reset ()
| Reset the validator to decode another message.

## Detailed Description

Provides streaming UTF8 validation functionality.

Definition at line 81 of file utf8_validator.hpp.

## Constructor & Destructor Documentation

## validator()

websocketpp::utf8_validator::validator::validator | ( |  | ) |

inline

Construct and initialize the validator.

Definition at line 84 of file utf8_validator.hpp.

## Member Function Documentation

## complete()

bool websocketpp::utf8_validator::validator::complete | ( |  | ) |

inline

Return whether the input sequence ended on a valid utf8 codepoint.

Returns
  Whether or not the input sequence ended on a valid codepoint.

Definition at line 124 of file utf8_validator.hpp.

## consume()

bool websocketpp::utf8_validator::validator::consume | ( | uint8_t | byte | ) |

inline

Advance the state of the validator with the next input byte.

Parameters

  byte | The byte to advance the validation state with

Returns
  Whether or not the byte resulted in a validation error.

Definition at line 91 of file utf8_validator.hpp.

## decode()

template<typename iterator_type>

bool websocketpp::utf8_validator::validator::decode | ( | iterator_type | begin,
|  | iterator_type | end )

inline

Advance validator state with input from an iterator pair.

Parameters

  begin | Input iterator to the start of the input range
  end | Input iterator to the end of the input range

Returns
  Whether or not decoding the bytes resulted in a validation error.

Definition at line 105 of file utf8_validator.hpp.

## reset()

void websocketpp::utf8_validator::validator::reset | ( |  | ) |

inline

Reset the validator to decode another message.

Definition at line 129 of file utf8_validator.hpp.

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

- websocketpp/utf8_validator.hpp