fastdo
0.6.16
|
元素和块解析器 更多...
#include <elem_parser.hpp>
Public 成员函数 | |
ElemParserEx (ElemPackage const &package) | |
Element * | parse (winux::AnsiString const &str, Element *container) const |
解析成元素 更多... | |
Document * | parse (winux::AnsiString const &str, DocumentCreator docCreator=nullptr) const |
解析成文档 更多... | |
int | searchDelim (winux::AnsiString const &str, int offset, int *length, int *internalStart, int *internalLength, bool *isBlock) const |
搜索一对边界符,返回其位置,否则返回-1 更多... | |
int | search (winux::AnsiString const &str, int offset, int *length, int *internalStart, int *internalLength, bool *isBlock, winux::AnsiString *tagName, int *iEndTagName, int *remainLength, bool *isHead, bool *isOdd) const |
搜一个在标签包中存在的标签,并返回其位置,否则返回-1 更多... | |
void | readElement (winux::AnsiString const &str, int iEndTagName, int remainLength, winux::AnsiString *defAttr, Attributes *attrs) const |
读一个元素标签属性数据 更多... | |
void | readBlock (winux::AnsiString const &str, int iEndBlockTag, int remainLength, winux::AnsiString *blockContent) const |
读一个块标签数据 更多... | |
元素和块解析器
在文件 elem_parser.hpp 第 69 行定义.
eienml::ElemParserEx::ElemParserEx | ( | ElemPackage const & | package | ) |
Element* eienml::ElemParserEx::parse | ( | winux::AnsiString const & | str, |
Element * | container | ||
) | const |
解析成元素
Document* eienml::ElemParserEx::parse | ( | winux::AnsiString const & | str, |
DocumentCreator | docCreator = nullptr |
||
) | const |
解析成文档
int eienml::ElemParserEx::searchDelim | ( | winux::AnsiString const & | str, |
int | offset, | ||
int * | length, | ||
int * | internalStart, | ||
int * | internalLength, | ||
bool * | isBlock | ||
) | const |
搜索一对边界符,返回其位置,否则返回-1
str | 主字符串 |
offset | 偏移起始位置 |
length | 返回搜到的长度(包含左右定界符) |
internalStart | 返回内部内容的开始位置(不包含定界符) |
internalLength | 返回内部内容的长度(不包含定界符) |
isBlock | 返回是否为块 |
int eienml::ElemParserEx::search | ( | winux::AnsiString const & | str, |
int | offset, | ||
int * | length, | ||
int * | internalStart, | ||
int * | internalLength, | ||
bool * | isBlock, | ||
winux::AnsiString * | tagName, | ||
int * | iEndTagName, | ||
int * | remainLength, | ||
bool * | isHead, | ||
bool * | isOdd | ||
) | const |
搜一个在标签包中存在的标签,并返回其位置,否则返回-1
str | 主字符串 |
offset | 起始偏移位置 |
length | 返回搜到的长度(包含左右定界符) |
internalStart | 返回内部内容的开始位置(不包含定界符,处理了'/') |
internalLength | 返回内部内容的长度(不包含定界符,处理了'/') |
isBlock | 返回是否为块 |
tagName | 返回TagName或BlockTag |
iEndTagName | 返回TagName或BlockTag结束后的位置 |
remainLength | 返回TagName或BlockTag结束后剩余的长度 |
isHead | 返回是否是头 |
isOdd | 返回是否独立元素写法 |
void eienml::ElemParserEx::readElement | ( | winux::AnsiString const & | str, |
int | iEndTagName, | ||
int | remainLength, | ||
winux::AnsiString * | defAttr, | ||
Attributes * | attrs | ||
) | const |
读一个元素标签属性数据
void eienml::ElemParserEx::readBlock | ( | winux::AnsiString const & | str, |
int | iEndBlockTag, | ||
int | remainLength, | ||
winux::AnsiString * | blockContent | ||
) | const |
读一个块标签数据