Poco::FastInfoset

class DocumentRestrictedAlphabet

File Information

Library: FastInfoset
Package: FastInfoset
Header: Poco/FastInfoset/DocumentRestrictedAlphabet.h

Description

DocumentRestrictedAlphabet stores the prefined simple vocabularies for numeric or date time de-/encoding.

Member Summary

Member Functions: add, alphabet, alphabets, charToIndex, indexToChar, operator -

Types

Alphabets

typedef std::vector < RestrictedAlphabet > Alphabets;

Constructors

DocumentRestrictedAlphabet

DocumentRestrictedAlphabet();

Destructor

~DocumentRestrictedAlphabet

~DocumentRestrictedAlphabet();

Member Functions

add

Poco::UInt32 add(
    const std::string & str
);

Adds the string as a new vocabulary, returns the ids of the vocabulary, the maximum is limited to 256 vocabularies.

alphabet inline

RestrictedAlphabet & alphabet(
    Poco::UInt32 vocabulary
);

Returns the alphabet for the given id.

alphabets inline

const Alphabets & alphabets() const;

Returns all defined alphabets.

charToIndex inline

int charToIndex(
    Poco::UInt32 vocabulary,
    int value
) const;

Returns the index for the given vocabulary and Unicode character.

indexToChar inline

int indexToChar(
    Poco::UInt32 vocabulary,
    int index
) const;

Returns the Unicode character for the given vocabulary and character index.

operator -

DocumentRestrictedAlphabet operator - (
    const DocumentRestrictedAlphabet & other
);

Subtracts another restricted alphabet from this one.

The other vocabulary must be smaller than this alphabet The content of the alphabets is not checked but assumed to be equal.

Variables

DATE_TIME_CHARACTERS static

static const std::string DATE_TIME_CHARACTERS;

NUMERIC_CHARACTERS static

static const std::string NUMERIC_CHARACTERS;

Securely control IoT edge devices from anywhere   Connect a Device