HTML::CharsetASCII Struct Reference

Inheritance diagram for HTML::CharsetASCII:

HTML::CharsetFunctions List of all members.

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

Constructor & Destructor Documentation

HTML::CharsetASCII::CharsetASCII (  )  [inline]


Member Function Documentation

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.

Parameters:
input The input string pointer
length The input length (if not known, set it to zero, it will be calculated automatically) in byte
Returns:
the char position in the source string

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.

Parameters:
input The input string pointer
length The input length (if not known, set it to zero, it will be calculated automatically) in byte
Returns:
the position for the next attribute mark (just before '"' or ''') in byte, or -1 if not found.

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.

Parameters:
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
Returns:
the position for the current attribute name end (just after the last char of the name) in byte, or -1 if not found.

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.

Parameters:
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
Returns:
the position for the current attribute name end (just after the last char of the name) in byte, or -1 if not found.

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.

Parameters:
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
Returns:
the position for the current attribute end position end (just after the last char of the name) in byte, or -1 if not found.

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.

Parameters:
input The input string pointer
length The input length (if not known, set it to zero, it will be calculated automatically) in byte
Returns:
the position for the next start tag (just before '<') in byte, or -1 if not found.

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.

Parameters:
input The input string pointer
length The input length (if not known, set it to zero, it will be calculated automatically) in byte
Returns:
the position for the current tag end (just before '>') in byte, or -1 if not found.

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.

Parameters:
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
Returns:
the position for the searched tag end (just after '<') in byte, or -1 if not found.

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.

Parameters:
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
Returns:
the position for the current tag name end (just after the last char of the name) in byte, or -1 if not found.

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.

Warning:
The return can be different from read attribute name, in order to speed up attributeging
Returns:
the last attribute name in an char array (not tchar)

Implements HTML::CharsetFunctions.

virtual const int& HTML::CharsetASCII::lastFoundAttributeNameLength (  )  const [inline, virtual]

Get the last found attribute length.

Warning:
The return can be different from read attribute name's length, in order to speed up attributeging
Returns:
the last attribute name length

Implements HTML::CharsetFunctions.

virtual char const* const HTML::CharsetASCII::lastFoundTagName (  )  const [inline, virtual]

Get the last found tag name.

Warning:
The return can be different from read tag name, in order to speed up tagging
Returns:
the last tag name in an char array (not tchar)

Implements HTML::CharsetFunctions.

virtual const int& HTML::CharsetASCII::lastFoundTagNameLength (  )  const [inline, virtual]

Get the last found tag length.

Warning:
The return can be different from read tag name's length, in order to speed up tagging
Returns:
the last tag name 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.


Member Data Documentation

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]


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

(C) An X-Ryl669 project 2007

This document describes Unlimited Zooming Interface source code. UZI stands for Unlimited Zooming Interface, and source code license is