Inheritance diagram for HTML::CharsetASCII:
Public Member Functions | |
CharsetASCII () | |
bool | check4BytesAtATime (const tchar *const test, const uint32 value) const |
This is made as little endian dependent. | |
int | eatChar (const tchar *const input, const int length, const unsigned int magic) const |
virtual int | findAChar (const tchar *const input, const int length, const tchar ch) const |
Find the the position for the given char in the input string this function is charset and encoding independent. | |
virtual int | findAttributeMark (const tchar *const input, const int length) const |
Find the first attribute marker from string (started by " or ' in ASCII) this function is charset and encoding independent. | |
virtual int | findAttributeName (const tchar *const input, const int length, int &TagNameStartPosition) const |
Find the current attribute name this function is charset and encoding independent. | |
int | findChar (const tchar *const input, const int length, const unsigned int magic) const |
int | findChars (const tchar *const input, const int length, const unsigned int magic, const unsigned int magic2) const |
virtual unsigned int | findLength (const tchar *const input) const |
Find the length of a string. | |
virtual int | findNextAttribute (const tchar *const input, const int length, int &attribStartPos) const |
Find next attribute this function is charset and encoding independent. | |
int | findNextAttributeChar (const tchar *const input, const int length) const |
virtual int | findNextAttributeContent (const tchar *const input, const int length, int &attribStartPos) const |
Find next attribute content this function is charset and encoding independent. | |
int | findNextAttributeRL (const tchar *const input, const int length, int &attributeLength) const |
Currently this method is implemented as forward search for '=', then backward inverse search for ' ', then backward search for ' '. | |
virtual int | findNextStartTag (const tchar *const input, const int length) const |
Find the next start tag (started by '<' in ASCII) this function is charset and encoding independent. | |
virtual int | findNextTagEnd (const tchar *const input, const int length) const |
Find the current tag end (started by '>' in ASCII) this function is charset and encoding independent. | |
virtual int | findSpecificTagEnd (const char *tagName, const unsigned int tagNameLen, const tchar *const input, const int length) const |
Find the a specific tag end (started by '</' in ASCII) this function is charset and encoding independent. | |
virtual int | findTagName (const tchar *const input, const int length, int &TagNameStartPosition) const |
Find the current tag name this function is charset and encoding independent. | |
bool | isAlpha (tchar ch) const |
virtual char const *const | lastFoundAttributeName () const |
Get the last found attribute name. | |
virtual const int & | lastFoundAttributeNameLength () const |
Get the last found attribute length. | |
virtual char const *const | lastFoundTagName () const |
Get the last found tag name. | |
virtual const int & | lastFoundTagNameLength () const |
Get the last found tag length. | |
int | possibleNameLengthAndAdapt (const tchar *const input, const int length, const bool tag=true) const |
This method look for the last position from the string which wouldn't match ch. | |
int | reverseFindChar_slow (const tchar *const input, const int length, const tchar charToSearch) const |
This method look for the last position from the string which would match ch. | |
Public Attributes | |
tchar | AllowedCharForAttribute [256] |
tchar | AllowedCharForElement [256] |
char | lastAttributeName [16] |
int | lastAttributeNameLength |
char | lastTagName [16] |
int | lastTagNameLength |
HTML::CharsetASCII::CharsetASCII | ( | ) | [inline] |
bool HTML::CharsetASCII::check4BytesAtATime | ( | const tchar *const | test, | |
const uint32 | value | |||
) | const [inline] |
This is made as little endian dependent.
int HTML::CharsetASCII::eatChar | ( | const tchar *const | input, | |
const int | length, | |||
const unsigned int | magic | |||
) | const [inline] |
virtual int HTML::CharsetASCII::findAChar | ( | const tchar *const | input, | |
const int | length, | |||
const tchar | ch | |||
) | const [inline, virtual] |
Find the the position for the given char in the input string this function is charset and encoding independent.
input | The input string pointer | |
length | The input length (if not known, set it to zero, it will be calculated automatically) in byte |
Implements HTML::CharsetFunctions.
virtual int HTML::CharsetASCII::findAttributeMark | ( | const tchar *const | input, | |
const int | length | |||
) | const [inline, virtual] |
Find the first attribute marker from string (started by " or ' in ASCII) this function is charset and encoding independent.
input | The input string pointer | |
length | The input length (if not known, set it to zero, it will be calculated automatically) in byte |
Implements HTML::CharsetFunctions.
virtual int HTML::CharsetASCII::findAttributeName | ( | const tchar *const | input, | |
const int | length, | |||
int & | TagNameStartPosition | |||
) | const [inline, virtual] |
Find the current attribute name this function is charset and encoding independent.
input | The input string pointer | |
length | The input length (if not known, set it to zero, it will be calculated automatically) in byte | |
attributeStartPos | The position of the first char in the attribute name |
Implements HTML::CharsetFunctions.
int HTML::CharsetASCII::findChar | ( | const tchar *const | input, | |
const int | length, | |||
const unsigned int | magic | |||
) | const [inline] |
int HTML::CharsetASCII::findChars | ( | const tchar *const | input, | |
const int | length, | |||
const unsigned int | magic, | |||
const unsigned int | magic2 | |||
) | const [inline] |
virtual unsigned int HTML::CharsetASCII::findLength | ( | const tchar *const | input | ) | const [inline, virtual] |
Find the length of a string.
We can rely on strlen for ASCII. However, this version is highly optimized
Implements HTML::CharsetFunctions.
virtual int HTML::CharsetASCII::findNextAttribute | ( | const tchar *const | input, | |
const int | length, | |||
int & | attribStartPos | |||
) | const [inline, virtual] |
Find next attribute this function is charset and encoding independent.
input | The input string pointer | |
length | The input length (if not known, set it to zero, it will be calculated automatically) in byte | |
attribStartPos | The found attribute position in the given stream |
Implements HTML::CharsetFunctions.
int HTML::CharsetASCII::findNextAttributeChar | ( | const tchar *const | input, | |
const int | length | |||
) | const [inline] |
virtual int HTML::CharsetASCII::findNextAttributeContent | ( | const tchar *const | input, | |
const int | length, | |||
int & | attribStartPos | |||
) | const [inline, virtual] |
Find next attribute content this function is charset and encoding independent.
input | The input string pointer | |
length | The input length (if not known, set it to zero, it will be calculated automatically) in byte | |
attribStartPos | The first found attribute content position in the given stream |
Implements HTML::CharsetFunctions.
int HTML::CharsetASCII::findNextAttributeRL | ( | const tchar *const | input, | |
const int | length, | |||
int & | attributeLength | |||
) | const [inline] |
Currently this method is implemented as forward search for '=', then backward inverse search for ' ', then backward search for ' '.
virtual int HTML::CharsetASCII::findNextStartTag | ( | const tchar *const | input, | |
const int | length | |||
) | const [inline, virtual] |
Find the next start tag (started by '<' in ASCII) this function is charset and encoding independent.
input | The input string pointer | |
length | The input length (if not known, set it to zero, it will be calculated automatically) in byte |
Implements HTML::CharsetFunctions.
virtual int HTML::CharsetASCII::findNextTagEnd | ( | const tchar *const | input, | |
const int | length | |||
) | const [inline, virtual] |
Find the current tag end (started by '>' in ASCII) this function is charset and encoding independent.
input | The input string pointer | |
length | The input length (if not known, set it to zero, it will be calculated automatically) in byte |
Implements HTML::CharsetFunctions.
virtual int HTML::CharsetASCII::findSpecificTagEnd | ( | const char * | tagName, | |
const unsigned int | tagNameLen, | |||
const tchar *const | input, | |||
const int | length | |||
) | const [inline, virtual] |
Find the a specific tag end (started by '</' in ASCII) this function is charset and encoding independent.
tagName | The tagName to look for | |
tagNameLen | The length of the provided tag name | |
input | The input string pointer | |
length | The input length (if not known, set it to zero, it will be calculated automatically) in byte |
Implements HTML::CharsetFunctions.
virtual int HTML::CharsetASCII::findTagName | ( | const tchar *const | input, | |
const int | length, | |||
int & | TagNameStartPosition | |||
) | const [inline, virtual] |
Find the current tag name this function is charset and encoding independent.
input | The input string pointer | |
length | The input length (if not known, set it to zero, it will be calculated automatically) in byte | |
tagStartPos | The position of the first char in the tag name |
Implements HTML::CharsetFunctions.
bool HTML::CharsetASCII::isAlpha | ( | tchar | ch | ) | const [inline] |
virtual char const* const HTML::CharsetASCII::lastFoundAttributeName | ( | ) | const [inline, virtual] |
Get the last found attribute name.
Implements HTML::CharsetFunctions.
virtual const int& HTML::CharsetASCII::lastFoundAttributeNameLength | ( | ) | const [inline, virtual] |
Get the last found attribute length.
Implements HTML::CharsetFunctions.
virtual char const* const HTML::CharsetASCII::lastFoundTagName | ( | ) | const [inline, virtual] |
Get the last found tag name.
Implements HTML::CharsetFunctions.
virtual const int& HTML::CharsetASCII::lastFoundTagNameLength | ( | ) | const [inline, virtual] |
Get the last found tag length.
Implements HTML::CharsetFunctions.
int HTML::CharsetASCII::possibleNameLengthAndAdapt | ( | const tchar *const | input, | |
const int | length, | |||
const bool | tag = true | |||
) | const [inline] |
This method look for the last position from the string which wouldn't match ch.
int HTML::CharsetASCII::reverseFindChar_slow | ( | const tchar *const | input, | |
const int | length, | |||
const tchar | charToSearch | |||
) | const [inline] |
This method look for the last position from the string which would match ch.
tchar HTML::CharsetASCII::AllowedCharForAttribute[256] |
tchar HTML::CharsetASCII::AllowedCharForElement[256] |
char HTML::CharsetASCII::lastAttributeName[16] [mutable] |
int HTML::CharsetASCII::lastAttributeNameLength [mutable] |
char HTML::CharsetASCII::lastTagName[16] [mutable] |
int HTML::CharsetASCII::lastTagNameLength [mutable] |