資源簡介
最完整的tinyxml庫文件 包括cpp,lib,test,頭文件

代碼片段和文件信息
/*
www.sourceforge.net/projects/tinyxml
Original?file?by?Yves?Berquin.
This?software?is?provided?‘as-is‘?without?any?express?or?implied
warranty.?In?no?event?will?the?authors?be?held?liable?for?any
damages?arising?from?the?use?of?this?software.
Permission?is?granted?to?anyone?to?use?this?software?for?any
purpose?including?commercial?applications?and?to?alter?it?and
redistribute?it?freely?subject?to?the?following?restrictions:
1.?The?origin?of?this?software?must?not?be?misrepresented;?you?must
not?claim?that?you?wrote?the?original?software.?If?you?use?this
software?in?a?product?an?acknowledgment?in?the?product?documentation
would?be?appreciated?but?is?not?required.
2.?Altered?source?versions?must?be?plainly?marked?as?such?and
must?not?be?misrepresented?as?being?the?original?software.
3.?This?notice?may?not?be?removed?or?altered?from?any?source
distribution.
*/
/*
?*?THIS?FILE?WAS?ALTERED?BY?Tyge?L鴙set?7.?April?2005.
?*/
#include?“stdafx.h“
#include?“tinystr.h“
#ifndef?TIxml_USE_STL
//?Error?value?for?find?primitive
const?TixmlString::size_type?TixmlString::npos?=?static_castlString::size_type?>(-1);
//?Null?rep.
TixmlString::Rep?TixmlString::nullrep_?=?{?0?0?‘\0‘?};
void?TixmlString::reserve?(size_type?cap)
{
if?(cap?>?capacity())
{
TixmlString?tmp;
tmp.init(length()?cap);
memcpy(tmp.start()?data()?length());
swap(tmp);
}
}
TixmlString&?TixmlString::assign(const?char*?str?size_type?len)
{
size_type?cap?=?capacity();
if?(len?>?cap?||?cap?>?3*(len?+?8))
{
TixmlString?tmp;
tmp.init(len);
memcpy(tmp.start()?str?len);
swap(tmp);
}
else
{
memmove(start()?str?len);
set_size(len);
}
return?*this;
}
TixmlString&?TixmlString::append(const?char*?str?size_type?len)
{
size_type?newsize?=?length()?+?len;
if?(newsize?>?capacity())
{
reserve?(newsize?+?capacity());
}
memmove(finish()?str?len);
set_size(newsize);
return?*this;
}
TixmlString?operator?+?(const?TixmlString?&?a?const?TixmlString?&?b)
{
TixmlString?tmp;
tmp.reserve(a.length()?+?b.length());
tmp?+=?a;
tmp?+=?b;
return?tmp;
}
TixmlString?operator?+?(const?TixmlString?&?a?const?char*?b)
{
TixmlString?tmp;
TixmlString::size_type?b_len?=?static_castlString::size_type>(?strlen(b)?);
tmp.reserve(a.length()?+?b_len);
tmp?+=?a;
tmp.append(b?b_len);
return?tmp;
}
TixmlString?operator?+?(const?char*?a?const?TixmlString?&?b)
{
TixmlString?tmp;
TixmlString::size_type?a_len?=?static_castlString::size_type>(?strlen(a)?);
tmp.reserve(a_len?+?b.length());
tmp.append(a?a_len);
tmp?+=?b;
return?tmp;
}
#endif //?TIxml_USE_STL
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2708??2009-10-28?10:09??TINYxm
?????文件???????4813??2009-10-27?12:20??TINYxm
?????文件???????1413??2009-10-28?10:29??TINYxm
?????文件????????403??2009-10-28?10:07??TINYxm
?????文件????????468??2009-10-28?10:07??TINYxm
?????文件????????385??2009-10-28?10:09??TINYxm
?????文件??????56715??2009-10-28?10:09??TINYxm
?????文件????1048576??2009-10-28?10:07??TINYxm
?????文件??????40670??2009-10-28?10:09??TINYxm
?????文件?????????66??2009-10-28?10:09??TINYxm
?????文件??????10593??2009-10-28?10:07??TINYxm
?????文件?????191488??2009-10-28?10:09??TINYxm
?????文件?????274432??2009-10-28?10:09??TINYxm
?????目錄??????????0??2009-10-28?10:09??TINYxm
?????文件????????289??2009-10-27?09:59??TINYxm
?????文件???????1270??2009-10-24?16:06??TINYxm
?????文件????????288??2009-10-24?16:06??TINYxm
?????文件????????376??2009-10-24?16:06??TINYxm
?????文件????????420??2009-10-23?11:27??TINYxm
?????文件???????8764??2006-04-19?12:51??TINYxm
?????文件??????56020??2009-10-27?11:58??TINYxm
?????文件??????37467??2006-09-19?19:04??TINYxm
?????目錄??????????0??2009-10-28?10:09??TINYxm
?????文件????1649664??2009-10-28?10:29??TINYxm
?????文件????????868??2009-10-24?16:06??TINYxm
????..A..H.?????27648??2009-10-28?10:29??TINYxm
?????文件?????237568??2009-10-28?10:09??TINYxm
?????文件?????682568??2009-10-28?10:09??TINYxm
?????文件?????830464??2009-10-28?10:09??TINYxm
?????目錄??????????0??2009-10-28?10:09??TINYxm
............此處省略18個文件信息
評論
共有 條評論