#include <weTagScanner.h>
Public Member Functions | |
WeTagScanner (WeInStream &is) | |
Constructor. | |
virtual | ~WeTagScanner () |
WeScannerToken | GetToken () |
Gets the next token from stream. | |
const char * | GetValue () |
Gets the value. | |
const char * | GetAttrName () |
Gets the attribute name. | |
const char * | GetTagName () |
Gets the tag name. | |
virtual char | ResolveEntity (const char *buf, int buf_size) |
Resolve entity. | |
virtual int | GetPos () |
Private Types | |
typedef WeScannerToken(WeTagScanner::* | fnScan )() |
WebEngine scanner token parser function. | |
Private Member Functions | |
WeScannerToken | ScanBody () |
Scans the body. | |
WeScannerToken | ScanHead () |
Scans the head. | |
WeScannerToken | ScanComment () |
Scans the comment. | |
WeScannerToken | ScanCdata () |
Scans the cdata. | |
WeScannerToken | ScanPi () |
Scans the PHP includes. | |
WeScannerToken | ScanTag () |
Scans the tag. | |
WeScannerToken | ScanEntityDecl () |
Scans the cdata. | |
char | SkipWhitespace () |
Skip whitespaces. | |
void | PushBack (char c) |
Pushes the given character back to the stream. | |
char | GetChar () |
Gets the char from the input stream. | |
char | ScanEntity () |
Scans the entity (&-based encoding). | |
bool | IsWhitespace (char c) |
Query if 'c' is whitespace. | |
void | AppendValue (char c) |
Appends a value. | |
void | AppendAttrName (char c) |
Appends an attribute name. | |
void | AppendTagName (char c) |
Appends a tag name. | |
Private Attributes | |
fnScan | c_scan |
Static Private Attributes | |
static const int | MAX_TOKEN_SIZE = 1024 |
static const int | MAX_NAME_SIZE = 128 |
This class implements operations to parsing the input stream for tag-based markup (i.e. HTML).
Definition at line 112 of file weTagScanner.h.
WeScannerToken(WeTagScanner::* WeTagScanner::fnScan)() [private] |
WebEngine scanner token parser function.
This type defines pointer to the scanner function. Used to switch scanner function to parse different regions of the source file.
WeTagScanner::WeTagScanner | ( | WeInStream & | is | ) | [inline] |
Constructor.
is | - the input stream to parse. |
Definition at line 120 of file weTagScanner.h.
virtual WeTagScanner::~WeTagScanner | ( | ) | [inline, virtual] |
Definition at line 127 of file weTagScanner.h.
void WeTagScanner::AppendAttrName | ( | char | c | ) | [private] |
Appends an attribute name.
c | - The char to append to the attribute name. |
Definition at line 508 of file weTagScanner.cpp.
void WeTagScanner::AppendTagName | ( | char | c | ) | [private] |
Appends a tag name.
c | - The char to append to the tag name. |
Definition at line 519 of file weTagScanner.cpp.
void WeTagScanner::AppendValue | ( | char | c | ) | [private] |
Appends a value.
c | - The char to append to the value. |
Definition at line 495 of file weTagScanner.cpp.
const char * WeTagScanner::GetAttrName | ( | void | ) |
Gets the attribute name.
null | if it fails, else the attribute name. |
Definition at line 62 of file weTagScanner.cpp.
char WeTagScanner::GetChar | ( | ) | [private] |
Gets the char from the input stream.
Definition at line 471 of file weTagScanner.cpp.
virtual int WeTagScanner::GetPos | ( | ) | [inline, virtual] |
Definition at line 150 of file weTagScanner.h.
const char * WeTagScanner::GetTagName | ( | void | ) |
Gets the tag name.
null | if it fails, else the tag name. |
Definition at line 74 of file weTagScanner.cpp.
WeScannerToken WeTagScanner::GetToken | ( | ) | [inline] |
Gets the next token from stream.
Definition at line 135 of file weTagScanner.h.
const char * WeTagScanner::GetValue | ( | void | ) |
Gets the value.
null | if it fails, else the value. |
Definition at line 50 of file weTagScanner.cpp.
bool WeTagScanner::IsWhitespace | ( | char | c | ) | [private] |
Query if 'c' is whitespace.
c | - The input character. |
true | if whitespace, false if not. |
Definition at line 483 of file weTagScanner.cpp.
void WeTagScanner::PushBack | ( | char | c | ) | [private] |
Pushes the given character back to the stream.
c | - The character to be returned to the stream. |
Definition at line 460 of file weTagScanner.cpp.
wchar_t WeTagScanner::ResolveEntity | ( | const char * | buf, | |
int | buf_size | |||
) | [inline, virtual] |
Resolve entity.
buf | - If non-null, the buffer. | |
buf_size | - Size of the buffer. |
Definition at line 149 of file weTagScanner.h.
WeScannerToken WeTagScanner::ScanBody | ( | void | ) | [private] |
WeScannerToken WeTagScanner::ScanCdata | ( | ) | [private] |
WeScannerToken WeTagScanner::ScanComment | ( | void | ) | [private] |
char WeTagScanner::ScanEntity | ( | ) | [private] |
Scans the entity (&-based encoding).
Definition at line 352 of file weTagScanner.cpp.
WeScannerToken WeTagScanner::ScanEntityDecl | ( | ) | [private] |
WeScannerToken WeTagScanner::ScanHead | ( | void | ) | [private] |
WeScannerToken WeTagScanner::ScanPi | ( | ) | [private] |
WeScannerToken WeTagScanner::ScanTag | ( | ) | [private] |
char WeTagScanner::SkipWhitespace | ( | ) | [private] |
Skip whitespaces.
Definition at line 445 of file weTagScanner.cpp.
fnScan WeTagScanner::c_scan [private] |
Definition at line 167 of file weTagScanner.h.
const int WeTagScanner::MAX_NAME_SIZE = 128 [static, private] |
Definition at line 155 of file weTagScanner.h.
const int WeTagScanner::MAX_TOKEN_SIZE = 1024 [static, private] |
Definition at line 154 of file weTagScanner.h.
©2009 Positive Technologies |
Generated on Tue Jul 14 18:27:32 2009 for WebEngine by |
|
1.5.7 |
|