CBlueUI  
C++ 跨平台跨框架的数据可视化工具
载入中...
搜索中...
未找到
BUI::XMLItemA类 参考

Public 成员函数

 XMLItemA ()
 
 ~XMLItemA ()
 
BeStringPairALabelPair ()
 
void BreakAway (BOOL isReleaseAllChild)
 脱离dom结构
 
void ReleaseChild ()
 
size_t GetChildCounts () const
 
XMLItemAGetChildObject (int index) const
 
BeStringPairAAttrbuteTextPair (unsigned int i)
 
unsigned int AttrbuteCount () const
 
void AppendAttrbute (BeStringA key, BeStringA value)
 
XMLItemAFirstChild () const
 
XMLItemALastChild () const
 
XMLItemAPrevSibling () const
 
XMLItemANextSibling () const
 
XMLItemAParent () 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)
 
XMLItemAFindChildByName (const char *name, BOOL createWhenNoFind=FALSE)
 查询节点
 
XMLItemAFindObjectByKeyPath (const char *keyPath, BOOL createWhenNoFind=FALSE)
 一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配。例如123
 
XMLItemAFindObjectByAttributePath (const char *attrName, const char *attrPath)
 根据执行属性名的值,为一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配
 
void StandardizationItem (void(*callback_free)(XMLItemA *node)=NULL)
 标准化树(将单一子节点,设置为节点的属性值)
 
XMLItemAAppendChild (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 XMLItemANextItem (XMLItemA *item)
 

Public 属性

XMLItemAparent
 
XMLItemAfirstChild
 
XMLItemAlastChild
 
XMLItemAprevSibling
 
XMLItemAnextSibling
 
BeStringPairA label
 
std::vector< BeStringPairAattributeList
 
int type_
 

Protected 成员函数

XMLItemAAllocXmlNode (int type)
 

构造及析构函数说明

◆ XMLItemA()

BUI::XMLItemA::XMLItemA ( )

◆ ~XMLItemA()

BUI::XMLItemA::~XMLItemA ( )

成员函数说明

◆ AllocXmlNode()

XMLItemA * BUI::XMLItemA::AllocXmlNode ( int  type)
protected

◆ AppendAttrbute()

void BUI::XMLItemA::AppendAttrbute ( BeStringA  key,
BeStringA  value 
)

◆ AppendChild()

XMLItemA * BUI::XMLItemA::AppendChild ( const char *  key = NULL,
const char *  value = NULL,
int  type = -1,
BOOL  addtail = TRUE 
)

◆ AttrbuteCount()

unsigned int BUI::XMLItemA::AttrbuteCount ( ) const

◆ AttrbuteTextPair()

BeStringPairA & BUI::XMLItemA::AttrbuteTextPair ( unsigned int  i)

◆ BreakAway()

void BUI::XMLItemA::BreakAway ( BOOL  isReleaseAllChild)

脱离dom结构

参数
isReleaseAllChild当为TRUE时,并且释放所有孩子节点占用内存,初始化为NULL。为FALSE时 仅脱离dom结构,并保留孩子节点

◆ Clone()

void BUI::XMLItemA::Clone ( XMLItemA otherNode)

将otherNode克隆到this节点。用于存储

参数
otherNode被克隆对象

◆ FindAttribute()

BOOL BUI::XMLItemA::FindAttribute ( const char *  name,
BeStringA outstr 
)

◆ FindAttributeFloat()

double BUI::XMLItemA::FindAttributeFloat ( const char *  name,
double  default_value 
)

◆ FindAttributeInt()

long BUI::XMLItemA::FindAttributeInt ( const char *  name,
long  default_value 
)

◆ FindChildByName()

XMLItemA * BUI::XMLItemA::FindChildByName ( const char *  name,
BOOL  createWhenNoFind = FALSE 
)

查询节点

参数
name节点名称
createWhenNoFind当为查询到时创建节点
返回
XMLItemA* 返回节点

◆ FindObjectByAttributePath()

XMLItemA * BUI::XMLItemA::FindObjectByAttributePath ( const char *  attrName,
const char *  attrPath 
)

根据执行属性名的值,为一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配

参数
attrName
attrPath"a.b.c"(此时树状结构123)
createWhenNoFind当为查询到时创建节点
返回
XMLItemA* 返回匹配的节点

◆ FindObjectByKeyPath()

XMLItemA * BUI::XMLItemA::FindObjectByKeyPath ( const char *  keyPath,
BOOL  createWhenNoFind = FALSE 
)

一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配。例如123

参数
keyPath"a.b.c"(此时树状结构123)
createWhenNoFind当为查询到时创建节点
返回
XMLItemA* 返回匹配的节点

◆ FirstChild()

XMLItemA * BUI::XMLItemA::FirstChild ( ) const

◆ GetChildCounts()

size_t BUI::XMLItemA::GetChildCounts ( ) const

◆ GetChildObject()

XMLItemA * BUI::XMLItemA::GetChildObject ( int  index) const

◆ LabelPair()

BeStringPairA & BUI::XMLItemA::LabelPair ( )

◆ LastChild()

XMLItemA * BUI::XMLItemA::LastChild ( ) const

◆ NextItem()

static XMLItemA * BUI::XMLItemA::NextItem ( XMLItemA item)
static

◆ NextSibling()

XMLItemA * BUI::XMLItemA::NextSibling ( ) const

◆ Parent()

XMLItemA * BUI::XMLItemA::Parent ( ) const

◆ PrevSibling()

XMLItemA * BUI::XMLItemA::PrevSibling ( ) const

◆ Print()

void BUI::XMLItemA::Print ( FILE *  fp,
BOOL  bFormate,
int  depth 
)

◆ ReleaseChild()

void BUI::XMLItemA::ReleaseChild ( )

◆ RemoveAllAttrbute()

void BUI::XMLItemA::RemoveAllAttrbute ( )

删除所有属性

◆ RemoveAttrbute()

void BUI::XMLItemA::RemoveAttrbute ( const char *  name)

删除指定属性

◆ SetAttribute()

BOOL BUI::XMLItemA::SetAttribute ( const char *  name,
const BeStringA str_value 
)

更新属性,若不存在,则新建属性

◆ StandardizationItem()

void BUI::XMLItemA::StandardizationItem ( void(*)(XMLItemA *node)  callback_free = NULL)

标准化树(将单一子节点,设置为节点的属性值)

参数
callback_free释放节点回调函数

类成员变量说明

◆ attributeList

std::vector<BeStringPairA> BUI::XMLItemA::attributeList

◆ firstChild

XMLItemA* BUI::XMLItemA::firstChild

◆ label

BeStringPairA BUI::XMLItemA::label

◆ lastChild

XMLItemA* BUI::XMLItemA::lastChild

◆ nextSibling

XMLItemA* BUI::XMLItemA::nextSibling

◆ parent

XMLItemA* BUI::XMLItemA::parent

◆ prevSibling

XMLItemA* BUI::XMLItemA::prevSibling

◆ type_

int BUI::XMLItemA::type_
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2025 · CBlueStudio 版权所有