CBlueUI
C++ 跨平台跨框架的数据可视化工具
|
Public 成员函数 | |
XMLItemA () | |
~XMLItemA () | |
BeStringPairA & | LabelPair () |
void | BreakAway (BOOL isReleaseAllChild) |
脱离dom结构 | |
void | ReleaseChild () |
size_t | GetChildCounts () const |
XMLItemA * | GetChildObject (int index) const |
BeStringPairA & | AttrbuteTextPair (unsigned int i) |
unsigned int | AttrbuteCount () const |
void | AppendAttrbute (BeStringA key, BeStringA value) |
XMLItemA * | FirstChild () const |
XMLItemA * | LastChild () const |
XMLItemA * | PrevSibling () const |
XMLItemA * | NextSibling () const |
XMLItemA * | Parent () const |
void | RemoveAllAttrbute () |
删除所有属性 | |
void | RemoveAttrbute (const char *name) |
删除指定属性 | |
BOOL | SetAttribute (const char *name, const BeStringA &str_value) |
更新属性,若不存在,则新建属性 | |
BOOL | FindAttribute (const char *name, BeStringA &outstr) |
long | FindAttributeInt (const char *name, long default_value) |
double | FindAttributeFloat (const char *name, double default_value) |
XMLItemA * | FindChildByName (const char *name, BOOL createWhenNoFind=FALSE) |
查询节点 | |
XMLItemA * | FindObjectByKeyPath (const char *keyPath, BOOL createWhenNoFind=FALSE) |
一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配。例如123 | |
XMLItemA * | FindObjectByAttributePath (const char *attrName, const char *attrPath) |
根据执行属性名的值,为一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配 | |
void | StandardizationItem (void(*callback_free)(XMLItemA *node)=NULL) |
标准化树(将单一子节点,设置为节点的属性值) | |
XMLItemA * | AppendChild (const char *key=NULL, const char *value=NULL, int type=-1, BOOL addtail=TRUE) |
void | Print (FILE *fp, BOOL bFormate, int depth) |
void | Clone (XMLItemA *otherNode) |
将otherNode克隆到this节点。用于存储 | |
静态 Public 成员函数 | |
static XMLItemA * | NextItem (XMLItemA *item) |
Public 属性 | |
XMLItemA * | parent |
XMLItemA * | firstChild |
XMLItemA * | lastChild |
XMLItemA * | prevSibling |
XMLItemA * | nextSibling |
BeStringPairA | label |
std::vector< BeStringPairA > | attributeList |
int | type_ |
Protected 成员函数 | |
XMLItemA * | AllocXmlNode (int type) |
BUI::XMLItemA::XMLItemA | ( | ) |
BUI::XMLItemA::~XMLItemA | ( | ) |
|
protected |
XMLItemA * BUI::XMLItemA::AppendChild | ( | const char * | key = NULL , |
const char * | value = NULL , |
||
int | type = -1 , |
||
BOOL | addtail = TRUE |
||
) |
unsigned int BUI::XMLItemA::AttrbuteCount | ( | ) | const |
BeStringPairA & BUI::XMLItemA::AttrbuteTextPair | ( | unsigned int | i | ) |
void BUI::XMLItemA::BreakAway | ( | BOOL | isReleaseAllChild | ) |
脱离dom结构
isReleaseAllChild | 当为TRUE时,并且释放所有孩子节点占用内存,初始化为NULL。为FALSE时 仅脱离dom结构,并保留孩子节点 |
void BUI::XMLItemA::Clone | ( | XMLItemA * | otherNode | ) |
将otherNode克隆到this节点。用于存储
otherNode | 被克隆对象 |
double BUI::XMLItemA::FindAttributeFloat | ( | const char * | name, |
double | default_value | ||
) |
long BUI::XMLItemA::FindAttributeInt | ( | const char * | name, |
long | default_value | ||
) |
查询节点
name | 节点名称 |
createWhenNoFind | 当为查询到时创建节点 |
XMLItemA * BUI::XMLItemA::FindObjectByAttributePath | ( | const char * | attrName, |
const char * | attrPath | ||
) |
根据执行属性名的值,为一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配
attrName | |
attrPath | "a.b.c"(此时树状结构123) |
createWhenNoFind | 当为查询到时创建节点 |
XMLItemA* 返回匹配的节点
XMLItemA * BUI::XMLItemA::FindObjectByKeyPath | ( | const char * | keyPath, |
BOOL | createWhenNoFind = FALSE |
||
) |
一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配。例如123
keyPath | "a.b.c"(此时树状结构123 ) |
createWhenNoFind | 当为查询到时创建节点 |
XMLItemA* 返回匹配的节点
XMLItemA * BUI::XMLItemA::FirstChild | ( | ) | const |
size_t BUI::XMLItemA::GetChildCounts | ( | ) | const |
XMLItemA * BUI::XMLItemA::GetChildObject | ( | int | index | ) | const |
BeStringPairA & BUI::XMLItemA::LabelPair | ( | ) |
XMLItemA * BUI::XMLItemA::LastChild | ( | ) | const |
XMLItemA * BUI::XMLItemA::NextSibling | ( | ) | const |
XMLItemA * BUI::XMLItemA::Parent | ( | ) | const |
XMLItemA * BUI::XMLItemA::PrevSibling | ( | ) | const |
void BUI::XMLItemA::Print | ( | FILE * | fp, |
BOOL | bFormate, | ||
int | depth | ||
) |
void BUI::XMLItemA::ReleaseChild | ( | ) |
void BUI::XMLItemA::RemoveAllAttrbute | ( | ) |
删除所有属性
void BUI::XMLItemA::RemoveAttrbute | ( | const char * | name | ) |
删除指定属性
void BUI::XMLItemA::StandardizationItem | ( | void(*)(XMLItemA *node) | callback_free = NULL | ) |
标准化树(将单一子节点,设置为节点的属性值)
callback_free | 释放节点回调函数 |
std::vector<BeStringPairA> BUI::XMLItemA::attributeList |
XMLItemA* BUI::XMLItemA::firstChild |
BeStringPairA BUI::XMLItemA::label |
XMLItemA* BUI::XMLItemA::lastChild |
XMLItemA* BUI::XMLItemA::nextSibling |
XMLItemA* BUI::XMLItemA::parent |
XMLItemA* BUI::XMLItemA::prevSibling |
int BUI::XMLItemA::type_ |