Library: FastInfoset
Package: FastInfoset
Header: Poco/FastInfoset/DocumentRestrictedAlphabet.h
DocumentRestrictedAlphabet stores the prefined simple vocabularies for numeric or date time de-/encoding.
Member Functions: add, alphabet, alphabets, charToIndex, indexToChar, operator -
typedef std::vector < RestrictedAlphabet > Alphabets;
Creates the DocumentRestrictedAlphabet.
~DocumentRestrictedAlphabet();
Destroys the DocumentRestrictedAlphabet.
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.
RestrictedAlphabet & alphabet(
Poco::UInt32 vocabulary
);
Returns the alphabet for the given id.
const Alphabets & alphabets() const;
Returns all defined alphabets.
int charToIndex(
Poco::UInt32 vocabulary,
int value
) const;
Returns the index for the given vocabulary and Unicode character.
int indexToChar(
Poco::UInt32 vocabulary,
int index
) const;
Returns the Unicode character for the given vocabulary and character index.
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.
static const std::string DATE_TIME_CHARACTERS;
static const std::string NUMERIC_CHARACTERS;