TiXmlString& TiXmlString::assign(const char* str, size_type len)
{
size_type cap = capacity();
if (len > cap || cap > *(len + ))
{
TiXmlString tmp;
tmp.init(len); //这里有new操作
memcpy(tmp.start(), str, len);
swap(tmp);
}
else
{
memmove(start(), str, len);
set_size(len);
}
return *this;
} //////////////////////////////// void swap (TiXmlString& other)
{
Rep* r = rep_;
rep_ = other.rep_;
other.rep_ = r;
} ///////////////////////////////// ~TiXmlString ()
{
quit(); //里面有delete操作
}

跟了下tinyxml,感觉tinyxml的代码看着很舒服。感觉这里很有意思。

tinyxml_settattr的更多相关文章

随机推荐

  1. ActionBar官方教程(9)ActionBar的顶部tab模式(注意,已经被弃用)

    This interface is deprecated.Action bar navigation modes are deprecated and not supported by inline ...

  2. 关于HSL和HSV颜色空间的详细论述

    目前在计算机视觉领域存在着较多类型的颜色空间(color space).HSL和HSV是两种最常见的圆柱坐标表示的颜色模型,它重新影射了RGB模型,从而能够视觉上比RGB模型更具有视觉直观性. HSV ...

  3. poj2411Mondriaan's Dream(状压)

    http://poj.org/problem?id=2411 下次还是去学习下dfs的写法吧 自己乱写的好像有点乱 乱七八糟改了一通过了 以1 1 表示横着的 1 0 表示竖着的 枚举每一行的状态 再 ...

  4. 部署解决方案包 (SharePoint Server 2010)

    转:http://technet.microsoft.com/zh-cn/library/cc262995(v=office.14).aspx 本文介绍各个解决方案包,及其在 Microsoft Sh ...

  5. C#使用SQLite出错:无法加载 DLL“SQLite.Interop.dll”,找不到指定的模块

    在SQLite官方下载了System.Data.SQLite,编写如下测试代码: 复制内容到剪贴板 程序代码 using (SQLiteConnection conn = new SQLiteConn ...

  6. SQL Server触发器以及如何在SQL Server Manager中调试触发器

    ·只有inserted表有数据时,当前操作为insert:·inserted和deleted两张表都有数据时,当前操作为update:·只有deleted表有数据时,当前操作为delete. 1. C ...

  7. Warning: Function created with compilation errors!

    解决方案: sqlplus / as sysdba grant execute on UTL_I18N to scott; grant execute on DBMS_CRYPTO to scott;

  8. 【HTML】Advanced3:Tables: Columns, Headers, and Footers

    1. <table> <colgroup> <col> <col class="alternative"> <col> ...

  9. Windows Azure 基本操作手册

    http://www.cnblogs.com/sennly/p/4139663.html 基本测试信息 登陆地址:https://manage.windowsazure.cn(Azure管理门户,适用 ...

  10. Got error creating database manager: java.io.IOException解决方法

    14/03/26 23:03:55 ERROR tool.BaseSqoopTool: Got error creating database manager: java.io.IOException ...