Library: FastInfoset
Package: FastInfoset
Header: Poco/FastInfoset/RestrictedAlphabet.h
A RestrictedAlphabet consists of a sequence of single characters, the position of each character is equal to the integer value used to encode it. Example:
RestrictedAlphabet alph("0123456789"); poco_assert (alph.index('1') == 1); poco_assert (alph.value(1) == '1');
Member Functions: canEncode, data, getBitSize, index, value
Creates an illegal RestrictedAlphabet. Used for reserved alphabets 3-15
RestrictedAlphabet(
const Poco::XML::XMLString & data
);
Creates the RestrictedAlphabet.
Destroys the RestrictedAlphabet.
bool canEncode(
const Poco::XML::XMLString & data
);
Tests if we can encode a certain string with the given alphabet
const Poco::XML::XMLString & data() const;
int getBitSize() const;
Returns the number of bits required to encode a single character
Poco::UInt32 index(
const Poco::XML::XMLChar & value
) const;
Converts a value to its index, returns string::npos if not found.
const Poco::XML::XMLChar & value(
Poco::UInt32 idx
) const;
Converts a integer vaue to the character it presents.