CMGDK r49-rc2
公有成员 | 公有属性
hgl::TDFNode类参考

HyzTDF节点类 更多...

#include <TDF.H>

所有成员的列表。

公有成员

 TDFNode ()
virtual ~TDFNode ()
TDFNodeCreate ()
 创建一个节点
TDFNodeCreate (const WideString &)
 创建一个节点
TDFNodeFindNode (const WideString &)
 查找一个节点
void Add (TDFNode *n)
 增加一个节点
void Delete (const WideString &)
 删除一个节点
void Delete (TDFNode *)
 删除一个节点
void Clear ()
 清除当前节点的数据
bool ReadBool (const wchar_t *, bool &)
bool ReadInt8 (const wchar_t *, int8 &)
bool ReadInt16 (const wchar_t *, int16 &)
bool ReadInt32 (const wchar_t *, int32 &)
bool ReadInt64 (const wchar_t *, int64 &)
bool ReadUint8 (const wchar_t *, uint8 &)
bool ReadUint16 (const wchar_t *, uint16 &)
bool ReadUint32 (const wchar_t *, uint32 &)
bool ReadUint64 (const wchar_t *, uint64 &)
bool ReadFloat (const wchar_t *, float &)
bool ReadDouble (const wchar_t *, double &)
bool ReadString (const wchar_t *, WideString &)
bool ReadString (const wchar_t *, wchar_t *, int)
bool ReadData (const wchar_t *, void *, int)
bool ReadObject (const wchar_t *, DataObject *)
template<typename T >
bool Read (const wchar_t *name, T &data)
TDFNodeWriteBool (const wchar_t *, bool)
TDFNodeWriteInt8 (const wchar_t *, int8)
TDFNodeWriteInt16 (const wchar_t *, int16)
TDFNodeWriteInt32 (const wchar_t *, int32)
TDFNodeWriteInt64 (const wchar_t *, int64)
TDFNodeWriteUint8 (const wchar_t *, uint8)
TDFNodeWriteUint16 (const wchar_t *, uint16)
TDFNodeWriteUint32 (const wchar_t *, uint32)
TDFNodeWriteUint64 (const wchar_t *, uint64)
TDFNodeWriteFloat (const wchar_t *, float)
TDFNodeWriteDouble (const wchar_t *, double)
TDFNodeWriteString (const wchar_t *, const WideString &)
TDFNodeWriteData (const wchar_t *, const void *, int)
TDFNodeWriteObject (const wchar_t *, DataObject *)
template<typename T >
bool Write (const wchar_t *name, const T &data)
bool LoadFromStream (Stream *)
 从流中载入节点数据
bool LoadFromFile (const wchar_t *)
 从文件中载入节点数据
bool LoadFromFile (HAC *, const wchar_t *)
 从HAC包中的文件载入节点数据
bool SaveToStream (Stream *)
 保存当前节点到流中
bool SaveToFile (const wchar_t *)
 保存当前节点到文件

公有属性

WideString Name
 节点名称
MemStream Data
 节点数据
ObjectList< TDFNodeNode
 子节点

详细描述

HyzTDF节点类

TDF节点,一种类似BinaryXML,注册表的数据节点.
强烈建议不要在TDF节点中放置大块的数据,虽然你可以放置。


构造及析构函数文档

hgl::TDFNode::TDFNode ( )
hgl::TDFNode::~TDFNode ( ) [virtual]

成员函数文档

void hgl::TDFNode::Add ( TDFNode n) [inline]

增加一个节点

void hgl::TDFNode::Clear ( )

清除当前节点的数据

TDFNode * hgl::TDFNode::Create ( )

创建一个节点

创建一个没有名字的节点

返回:
创建后的节点
TDFNode * hgl::TDFNode::Create ( const WideString name)

创建一个节点

创建一个节点

参数:
name节点名称
返回:
创建后的节点
void hgl::TDFNode::Delete ( const WideString name)

删除一个节点

void hgl::TDFNode::Delete ( TDFNode node)

删除一个节点

TDFNode * hgl::TDFNode::FindNode ( const WideString name)

查找一个节点

根据名称查找一个节点

参数:
name名称
返回:
查找到的节点指针,未查到返回NULL
bool hgl::TDFNode::LoadFromFile ( const wchar_t *  filename)

从文件中载入节点数据

从文件中载入TDF节点

参数:
filename文件名
返回:
文件是否载入成功
bool hgl::TDFNode::LoadFromFile ( HAC hac,
const wchar_t *  filename 
)

从HAC包中的文件载入节点数据

从文件中载入TDF节点

参数:
hac
filename文件名
返回:
文件是否载入成功
bool hgl::TDFNode::LoadFromStream ( Stream stream)

从流中载入节点数据

template<typename T >
bool hgl::TDFNode::Read ( const wchar_t *  name,
T &  data 
) [inline]
bool hgl::TDFNode::ReadBool ( const wchar_t *  ,
bool &   
)
bool hgl::TDFNode::ReadData ( const wchar_t *  name,
void *  buf,
int  size 
)
bool hgl::TDFNode::ReadDouble ( const wchar_t *  ,
double &   
)
bool hgl::TDFNode::ReadFloat ( const wchar_t *  ,
float &   
)
bool hgl::TDFNode::ReadInt16 ( const wchar_t *  ,
int16  
)
bool hgl::TDFNode::ReadInt32 ( const wchar_t *  ,
int32  
)
bool hgl::TDFNode::ReadInt64 ( const wchar_t *  ,
int64  
)
bool hgl::TDFNode::ReadInt8 ( const wchar_t *  ,
int8  
)
bool hgl::TDFNode::ReadObject ( const wchar_t *  name,
DataObject obj 
)

从TDF节点中读取一个数据对象

参数:
name节点名称
obj数据对象
返回:
是否读取成功
bool hgl::TDFNode::ReadString ( const wchar_t *  ,
WideString  
)
bool hgl::TDFNode::ReadString ( const wchar_t *  name,
wchar_t *  str,
int  max_limit 
)

读取一个字符串

参数:
name节点名称
str字符串保存指针
max_limit字符串指针最大长度
返回:
是否读取成功
bool hgl::TDFNode::ReadUint16 ( const wchar_t *  ,
uint16  
)
bool hgl::TDFNode::ReadUint32 ( const wchar_t *  ,
uint32  
)
bool hgl::TDFNode::ReadUint64 ( const wchar_t *  ,
uint64  
)
bool hgl::TDFNode::ReadUint8 ( const wchar_t *  ,
uint8  
)
bool hgl::TDFNode::SaveToFile ( const wchar_t *  filename)

保存当前节点到文件

保存TDF数据成一个文件

参数:
filename文件名
返回:
是否保存成功
bool hgl::TDFNode::SaveToStream ( Stream stream)

保存当前节点到流中

template<typename T >
bool hgl::TDFNode::Write ( const wchar_t *  name,
const T &  data 
) [inline]
TDFNode* hgl::TDFNode::WriteBool ( const wchar_t *  ,
bool   
)
TDFNode * hgl::TDFNode::WriteData ( const wchar_t *  name,
const void *  buf,
int  size 
)
TDFNode* hgl::TDFNode::WriteDouble ( const wchar_t *  ,
double   
)
TDFNode* hgl::TDFNode::WriteFloat ( const wchar_t *  ,
float   
)
TDFNode* hgl::TDFNode::WriteInt16 ( const wchar_t *  ,
int16   
)
TDFNode* hgl::TDFNode::WriteInt32 ( const wchar_t *  ,
int32   
)
TDFNode* hgl::TDFNode::WriteInt64 ( const wchar_t *  ,
int64   
)
TDFNode* hgl::TDFNode::WriteInt8 ( const wchar_t *  ,
int8   
)
TDFNode * hgl::TDFNode::WriteObject ( const wchar_t *  name,
DataObject obj 
)
TDFNode* hgl::TDFNode::WriteString ( const wchar_t *  ,
const WideString  
)
TDFNode* hgl::TDFNode::WriteUint16 ( const wchar_t *  ,
uint16   
)
TDFNode* hgl::TDFNode::WriteUint32 ( const wchar_t *  ,
uint32   
)
TDFNode* hgl::TDFNode::WriteUint64 ( const wchar_t *  ,
uint64   
)
TDFNode* hgl::TDFNode::WriteUint8 ( const wchar_t *  ,
uint8   
)

成员数据文档

节点数据

节点名称

子节点


该类的文档由以下文件生成:
 全部  名字空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义