2 #ifndef __ELEMPACKAGE_HPP__ 3 #define __ELEMPACKAGE_HPP__ 7 typedef Element * ( * ElementCreator )( void );
8 typedef Document * ( * DocumentCreator )( void );
9 typedef TextNode * ( * TextNodeCreator )( void );
10 typedef Block * ( * BlockCreator )( void );
84 void addFlags(
winux::
uint flags ) { _flags |= flags; }
116 #endif // __ELEMPACKAGE_HPP__ XString< char > AnsiString
winux::AnsiString lBlockDelim
左块元素定界符
Element *(* ElementCreator)(void)
XString< _ChTy > AddSlashes(XString< _ChTy > const &str, XString< _ChTy > const &charlist)
winux::AnsiString escape(winux::AnsiString const &str) const
对字符进行换码,与unescape()配套
#define DEFINE_ATTR_METHOD_VAL(ty, name, memname)
ElemPackageFlags
元素包旗标选项开关
TextNode *(* TextNodeCreator)(void)
std::map< String, String > StringStringMap
winux::MultiMatch _text2entities
文本到实体
winux::AnsiString rBlockDelim
右块元素定界符
winux::AnsiString & convAttrName(winux::AnsiString *attrName) const
根据包设定转换属性名
winux::AnsiString addSlashes(winux::AnsiString const &str) const
特殊字符加上反斜杠
winux::MultiMatch _entities2text
实体到文本
static winux::AnsiString ADDSLASHES
要加反斜杠的字符 "\\\"\'"
标签名小写化(若指定,则设置元素创建器时标签名也要小写化)
BlockCreatorTable _blockTable
块名=>创建块的函数映射表
winux::AnsiString rElemDelim
右定界符
winux::AnsiString lElemDelim
左定界符
ElementCreatorTable _elemTable
元素名=>创建函数映射表
XString< _ChTy > & StrMakeLower(XString< _ChTy > *str)
void removeFlags(winux::uint flags)
移除旗标选项
winux::AnsiString unescape(winux::AnsiString const &str) const
进行反换码,与escape()配套
Simple,Tree,Strip,Replace的toString()是否换码文本内容
bool exists(winux::AnsiString const &tagName) const
指定的元素创建器是否存在
TextNodeCreator _textCreator
文本节点创建函数
winux::AnsiString & convTagName(winux::AnsiString *tagName) const
根据包设定转换标签名
std::map< winux::AnsiString, BlockCreator > BlockCreatorTable
XString< _ChTy > StripSlashes(XString< _ChTy > const &str, XString< _ChTy > const &charlist)
Block *(* BlockCreator)(void)
bool blockExists(winux::AnsiString const &blockTag) const
指定的块创建器是否存在
std::map< winux::AnsiString, ElementCreator > ElementCreatorTable
winux::AnsiString stripSlashes(winux::AnsiString const &str) const
去掉反斜杠