0
点赞
收藏
分享

微信扫一扫

TinyXML学习:TiXmlBase类

ZGtheGreat 2022-09-21 阅读 193

TiXmlBase:

作为整个TinyXML模型的基类,除了可以提供一些实用功能外,它几乎没有什么作用

TiXmlBase的友元类:

friend class TiXmlNode;
friend class TiXmlElement;
friend class

TiXmlBase的常用的成员函数:

virtual void Print( FILE* cfile, int depth ) const = 0;
// 所有的TinyXML类都可以将它们打印为文件流或string类
// (非STL模式下的TiXmlString,STL模式下的std :: string)
int Row() const { return location.row + 1; }
int Column() const { return location.col + 1; }
// 返回源文件中此节点或属性的位置(Row/Column)

void SetUserData( void* user ) { userData = user; }
void* GetUserData() { return userData; }
const void* GetUserData() const { return userData; }
// 设置/获取指向任意用户数据的指针

static void SetCondenseWhiteSpace( bool condense ) { condenseWhiteSpace = condense; }
static bool IsWhiteSpaceCondensed() { return condenseWhiteSpace; }
// 返回当前空白区域设置
static void EncodeString( const TIXML_STRING& str, TIXML_STRING* out );
// string中的扩展实体

 

如果需要了解TiXmlBase其他成员函数和数据成员,最好阅读TinyXML中TiXmlBase类的源码定义

转载请注明出处



举报

相关推荐

0 条评论