![]() |
CMGDK r49-rc2
|
HyzTDF节点类 更多...
#include <TDF.H>
公有成员 | |
TDFNode () | |
virtual | ~TDFNode () |
TDFNode * | Create () |
创建一个节点 | |
TDFNode * | Create (const WideString &) |
创建一个节点 | |
TDFNode * | FindNode (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) |
TDFNode * | WriteBool (const wchar_t *, bool) |
TDFNode * | WriteInt8 (const wchar_t *, int8) |
TDFNode * | WriteInt16 (const wchar_t *, int16) |
TDFNode * | WriteInt32 (const wchar_t *, int32) |
TDFNode * | WriteInt64 (const wchar_t *, int64) |
TDFNode * | WriteUint8 (const wchar_t *, uint8) |
TDFNode * | WriteUint16 (const wchar_t *, uint16) |
TDFNode * | WriteUint32 (const wchar_t *, uint32) |
TDFNode * | WriteUint64 (const wchar_t *, uint64) |
TDFNode * | WriteFloat (const wchar_t *, float) |
TDFNode * | WriteDouble (const wchar_t *, double) |
TDFNode * | WriteString (const wchar_t *, const WideString &) |
TDFNode * | WriteData (const wchar_t *, const void *, int) |
TDFNode * | WriteObject (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< TDFNode > | Node |
子节点 |
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 | 名称 |
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 | ) |
从流中载入节点数据
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 | ) |
保存当前节点到流中
bool hgl::TDFNode::Write | ( | const wchar_t * | name, |
const T & | data | ||
) | [inline] |
TDFNode* hgl::TDFNode::WriteBool | ( | const wchar_t * | , |
bool | |||
) |
TDFNode* hgl::TDFNode::WriteDouble | ( | const wchar_t * | , |
double | |||
) |
TDFNode* hgl::TDFNode::WriteFloat | ( | const wchar_t * | , |
float | |||
) |
TDFNode * hgl::TDFNode::WriteObject | ( | const wchar_t * | name, |
DataObject * | obj | ||
) |
TDFNode* hgl::TDFNode::WriteString | ( | const wchar_t * | , |
const WideString & | |||
) |