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

Public 成员函数

 XMLItemW ()
 
 ~XMLItemW ()
 
BeStringPairWLabelPair ()
 
void BreakAway (BOOL isReleaseAllChild)
 脱离dom结构
 
void ReleaseChild ()
 
size_t GetChildCounts () const
 
XMLItemWGetChildObject (int index) const
 
BeStringPairWAttrbuteTextPair (unsigned int i)
 
unsigned int AttrbuteCount () const
 
void AppendAttrbute (BeStringW key, BeStringW value)
 
XMLItemWFirstChild () const
 
XMLItemWLastChild () const
 
XMLItemWPrevSibling () const
 
XMLItemWNextSibling () const
 
XMLItemWParent () const
 
void RemoveAllAttrbute ()
 删除所有属性
 
void RemoveAttrbute (const WCHAR *name)
 删除指定属性
 
BOOL SetAttribute (const WCHAR *name, const BeStringW &str_value)
 设置属性值
 
BOOL FindAttribute (const WCHAR *name, BeStringW &outstr)
 
long FindAttributeInt (const WCHAR *name, long default_value)
 
double FindAttributeFloat (const WCHAR *name, double default_value)
 
XMLItemWFindChildByName (const WCHAR *name, BOOL createWhenNoFind=FALSE)
 
XMLItemWFindObjectByKeyPath (const WCHAR *keyPath, BOOL createWhenNoFind=FALSE)
 一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配。例如123
 
XMLItemWFindObjectByAttributePath (const WCHAR *attrName, const WCHAR *attrPath) const
 根据执行属性名的值,为一次读取层级节点信息。通过不断匹配keyPath的方式向深层次节点查找,直到匹配
 
void StandardizationItem (void(*callback_free)(XMLItemW *node)=NULL)
 标准化树(将单一子节点,设置为节点的属性值)
 
XMLItemWAppendChild (const WCHAR *key=NULL, const WCHAR *value=NULL, int type=-1, BOOL addtail=TRUE)
 
void Print (FILE *fp, BOOL bFormate, int depth)
 
void Clone (XMLItemW *otherNode)
 将otherNode克隆到this节点。用于存储
 

静态 Public 成员函数

static XMLItemWNextItem (XMLItemW *item)
 

Public 属性

XMLItemWparent
 
XMLItemWfirstChild
 
XMLItemWlastChild
 
XMLItemWprevSibling
 
XMLItemWnextSibling
 
BeStringPairW label
 
std::vector< BeStringPairWattributeList
 
int type_
 

Protected 成员函数

XMLItemWAllocXmlNode (int type)
 

构造及析构函数说明

◆ XMLItemW()

BUI::XMLItemW::XMLItemW ( )

◆ ~XMLItemW()

BUI::XMLItemW::~XMLItemW ( )

成员函数说明

◆ AllocXmlNode()

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

◆ AppendAttrbute()

void BUI::XMLItemW::AppendAttrbute ( BeStringW  key,
BeStringW  value 
)

◆ AppendChild()

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

◆ AttrbuteCount()

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

◆ AttrbuteTextPair()

BeStringPairW & BUI::XMLItemW::AttrbuteTextPair ( unsigned int  i)

◆ BreakAway()

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

脱离dom结构

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

◆ Clone()

void BUI::XMLItemW::Clone ( XMLItemW otherNode)

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

参数
otherNode被克隆对象

◆ FindAttribute()

BOOL BUI::XMLItemW::FindAttribute ( const WCHAR name,
BeStringW outstr 
)

◆ FindAttributeFloat()

double BUI::XMLItemW::FindAttributeFloat ( const WCHAR name,
double  default_value 
)

◆ FindAttributeInt()

long BUI::XMLItemW::FindAttributeInt ( const WCHAR name,
long  default_value 
)

◆ FindChildByName()

XMLItemW * BUI::XMLItemW::FindChildByName ( const WCHAR name,
BOOL  createWhenNoFind = FALSE 
)

◆ FindObjectByAttributePath()

XMLItemW * BUI::XMLItemW::FindObjectByAttributePath ( const WCHAR attrName,
const WCHAR attrPath 
) const

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

参数
attrName
attrPath"a.b.c"(此时树状结构123)
返回
XMLItemA* 返回匹配的节点

◆ FindObjectByKeyPath()

XMLItemW * BUI::XMLItemW::FindObjectByKeyPath ( const WCHAR keyPath,
BOOL  createWhenNoFind = FALSE 
)

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

参数
keyPath"a.b.c"(此时树状结构123)
返回
XMLItemA* 返回匹配的节点

◆ FirstChild()

XMLItemW * BUI::XMLItemW::FirstChild ( ) const

◆ GetChildCounts()

size_t BUI::XMLItemW::GetChildCounts ( ) const

◆ GetChildObject()

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

◆ LabelPair()

BeStringPairW & BUI::XMLItemW::LabelPair ( )

◆ LastChild()

XMLItemW * BUI::XMLItemW::LastChild ( ) const

◆ NextItem()

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

◆ NextSibling()

XMLItemW * BUI::XMLItemW::NextSibling ( ) const

◆ Parent()

XMLItemW * BUI::XMLItemW::Parent ( ) const

◆ PrevSibling()

XMLItemW * BUI::XMLItemW::PrevSibling ( ) const

◆ Print()

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

◆ ReleaseChild()

void BUI::XMLItemW::ReleaseChild ( )

◆ RemoveAllAttrbute()

void BUI::XMLItemW::RemoveAllAttrbute ( )

删除所有属性

◆ RemoveAttrbute()

void BUI::XMLItemW::RemoveAttrbute ( const WCHAR name)

删除指定属性

◆ SetAttribute()

BOOL BUI::XMLItemW::SetAttribute ( const WCHAR name,
const BeStringW str_value 
)

设置属性值

◆ StandardizationItem()

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

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

参数
callback_free释放节点回调函数

类成员变量说明

◆ attributeList

std::vector<BeStringPairW> BUI::XMLItemW::attributeList

◆ firstChild

XMLItemW* BUI::XMLItemW::firstChild

◆ label

BeStringPairW BUI::XMLItemW::label

◆ lastChild

XMLItemW* BUI::XMLItemW::lastChild

◆ nextSibling

XMLItemW* BUI::XMLItemW::nextSibling

◆ parent

XMLItemW* BUI::XMLItemW::parent

◆ prevSibling

XMLItemW* BUI::XMLItemW::prevSibling

◆ type_

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