Updated to latest TinyXML
Build TinyXML into core dll once and use it from CLI
This commit is contained in:
parent
2413655d3d
commit
4a84195a8c
|
@ -174,7 +174,7 @@
|
|||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_IMPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_IMPORT;TINYXML2_IMPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -216,7 +216,7 @@
|
|||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_IMPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_IMPORT;TINYXML2_IMPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -266,7 +266,7 @@
|
|||
<AdditionalIncludeDirectories>..\lib;..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_IMPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_IMPORT;TINYXML2_IMPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -327,7 +327,7 @@
|
|||
<AdditionalIncludeDirectories>..\lib;..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_IMPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_IMPORT;TINYXML2_IMPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
|
@ -357,12 +357,6 @@
|
|||
<ResourceCompile Include="version.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\externals\tinyxml\tinyxml2.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\lib\config.h" />
|
||||
<ClInclude Include="cmdlineparser.h" />
|
||||
<ClInclude Include="cppcheckexecutor.h" />
|
||||
|
@ -376,12 +370,6 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\externals\tinyxml\tinyxml2.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cmdlineparser.cpp" />
|
||||
<ClCompile Include="cppcheckexecutor.cpp" />
|
||||
<ClCompile Include="filelister.cpp" />
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
<ClInclude Include="pathmatch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\externals\tinyxml\tinyxml2.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
|
@ -55,9 +52,6 @@
|
|||
<ClCompile Include="cmdlineparser.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\externals\tinyxml\tinyxml2.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="version.rc">
|
||||
|
|
|
@ -425,13 +425,13 @@ void XMLUtil::ToStr( bool v, char* buffer, int bufferSize )
|
|||
|
||||
void XMLUtil::ToStr( float v, char* buffer, int bufferSize )
|
||||
{
|
||||
TIXML_SNPRINTF( buffer, bufferSize, "%g", v );
|
||||
TIXML_SNPRINTF( buffer, bufferSize, "%f", v );
|
||||
}
|
||||
|
||||
|
||||
void XMLUtil::ToStr( double v, char* buffer, int bufferSize )
|
||||
{
|
||||
TIXML_SNPRINTF( buffer, bufferSize, "%g", v );
|
||||
TIXML_SNPRINTF( buffer, bufferSize, "%f", v );
|
||||
}
|
||||
|
||||
|
||||
|
@ -499,8 +499,8 @@ char* XMLDocument::Identify( char* p, XMLNode** node )
|
|||
// What is this thing?
|
||||
// - Elements start with a letter or underscore, but xml is reserved.
|
||||
// - Comments: <!--
|
||||
// - Decleration: <?
|
||||
// - Everthing else is unknown to tinyxml.
|
||||
// - Declaration: <?
|
||||
// - Everything else is unknown to tinyxml.
|
||||
//
|
||||
|
||||
static const char* xmlHeader = { "<?" };
|
||||
|
@ -581,7 +581,8 @@ XMLNode::XMLNode( XMLDocument* doc ) :
|
|||
_document( doc ),
|
||||
_parent( 0 ),
|
||||
_firstChild( 0 ), _lastChild( 0 ),
|
||||
_prev( 0 ), _next( 0 )
|
||||
_prev( 0 ), _next( 0 ),
|
||||
_memPool( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1608,6 +1609,7 @@ XMLError XMLDocument::LoadFile( FILE* fp )
|
|||
fseek( fp, 0, SEEK_SET );
|
||||
|
||||
if ( size == 0 ) {
|
||||
SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 );
|
||||
return _errorID;
|
||||
}
|
||||
|
||||
|
@ -1662,6 +1664,7 @@ XMLError XMLDocument::SaveFile( FILE* fp, bool compact )
|
|||
|
||||
XMLError XMLDocument::Parse( const char* p, size_t len )
|
||||
{
|
||||
const char* start = p;
|
||||
Clear();
|
||||
|
||||
if ( !p || !*p ) {
|
||||
|
@ -1682,12 +1685,13 @@ XMLError XMLDocument::Parse( const char* p, size_t len )
|
|||
return _errorID;
|
||||
}
|
||||
|
||||
ParseDeep( _charBuffer, 0 );
|
||||
ptrdiff_t delta = p - start; // skip initial whitespace, BOM, etc.
|
||||
ParseDeep( _charBuffer+delta, 0 );
|
||||
return _errorID;
|
||||
}
|
||||
|
||||
|
||||
void XMLDocument::Print( XMLPrinter* streamer )
|
||||
void XMLDocument::Print( XMLPrinter* streamer ) const
|
||||
{
|
||||
XMLPrinter stdStreamer( stdout );
|
||||
if ( !streamer ) {
|
||||
|
@ -1835,8 +1839,8 @@ void XMLPrinter::PrintString( const char* p, bool restricted )
|
|||
|
||||
void XMLPrinter::PushHeader( bool writeBOM, bool writeDec )
|
||||
{
|
||||
static const unsigned char bom[] = { TIXML_UTF_LEAD_0, TIXML_UTF_LEAD_1, TIXML_UTF_LEAD_2, 0 };
|
||||
if ( writeBOM ) {
|
||||
static const unsigned char bom[] = { TIXML_UTF_LEAD_0, TIXML_UTF_LEAD_1, TIXML_UTF_LEAD_2, 0 };
|
||||
Print( "%s", bom );
|
||||
}
|
||||
if ( writeDec ) {
|
||||
|
|
|
@ -57,6 +57,23 @@ distribution.
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4251)
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifdef TINYXML2_EXPORT
|
||||
# define TINYXML2_LIB __declspec(dllexport)
|
||||
# elif defined(TINYXML2_IMPORT)
|
||||
# define TINYXML2_LIB __declspec(dllimport)
|
||||
# else
|
||||
# define TINYXML2_LIB
|
||||
# endif
|
||||
#else
|
||||
# define TINYXML2_LIB
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(DEBUG)
|
||||
# if defined(_MSC_VER)
|
||||
|
@ -172,7 +189,7 @@ private:
|
|||
NEEDS_DELETE = 0x200
|
||||
};
|
||||
|
||||
// After parsing, if *end != 0, it can be set to zero.
|
||||
// After parsing, if *_end != 0, it can be set to zero.
|
||||
int _flags;
|
||||
char* _start;
|
||||
char* _end;
|
||||
|
@ -397,18 +414,18 @@ private:
|
|||
are simply called with Visit().
|
||||
|
||||
If you return 'true' from a Visit method, recursive parsing will continue. If you return
|
||||
false, <b>no children of this node or its sibilings</b> will be visited.
|
||||
false, <b>no children of this node or its siblings</b> will be visited.
|
||||
|
||||
All flavors of Visit methods have a default implementation that returns 'true' (continue
|
||||
visiting). You need to only override methods that are interesting to you.
|
||||
|
||||
Generally Accept() is called on the TiXmlDocument, although all nodes support visiting.
|
||||
Generally Accept() is called on the XMLDocument, although all nodes support visiting.
|
||||
|
||||
You should never change the document from a callback.
|
||||
|
||||
@sa XMLNode::Accept()
|
||||
*/
|
||||
class XMLVisitor
|
||||
class TINYXML2_LIB XMLVisitor
|
||||
{
|
||||
public:
|
||||
virtual ~XMLVisitor() {}
|
||||
|
@ -554,7 +571,7 @@ public:
|
|||
|
||||
@endverbatim
|
||||
*/
|
||||
class XMLNode
|
||||
class TINYXML2_LIB XMLNode
|
||||
{
|
||||
friend class XMLDocument;
|
||||
friend class XMLElement;
|
||||
|
@ -690,7 +707,7 @@ public:
|
|||
return _prev;
|
||||
}
|
||||
|
||||
/// Get the previous (left) sibling element of this node, with an opitionally supplied name.
|
||||
/// Get the previous (left) sibling element of this node, with an optionally supplied name.
|
||||
const XMLElement* PreviousSiblingElement( const char* value=0 ) const ;
|
||||
|
||||
XMLElement* PreviousSiblingElement( const char* value=0 ) {
|
||||
|
@ -706,7 +723,7 @@ public:
|
|||
return _next;
|
||||
}
|
||||
|
||||
/// Get the next (right) sibling element of this node, with an opitionally supplied name.
|
||||
/// Get the next (right) sibling element of this node, with an optionally supplied name.
|
||||
const XMLElement* NextSiblingElement( const char* value=0 ) const;
|
||||
|
||||
XMLElement* NextSiblingElement( const char* value=0 ) {
|
||||
|
@ -759,12 +776,12 @@ public:
|
|||
*/
|
||||
virtual bool ShallowEqual( const XMLNode* compare ) const = 0;
|
||||
|
||||
/** Accept a hierarchical visit of the nodes in the TinyXML DOM. Every node in the
|
||||
/** Accept a hierarchical visit of the nodes in the TinyXML-2 DOM. Every node in the
|
||||
XML tree will be conditionally visited and the host will be called back
|
||||
via the TiXmlVisitor interface.
|
||||
via the XMLVisitor interface.
|
||||
|
||||
This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse
|
||||
the XML for the callbacks, so the performance of TinyXML is unchanged by using this
|
||||
This is essentially a SAX interface for TinyXML-2. (Note however it doesn't re-parse
|
||||
the XML for the callbacks, so the performance of TinyXML-2 is unchanged by using this
|
||||
interface versus any other.)
|
||||
|
||||
The interface has been based on ideas from:
|
||||
|
@ -776,7 +793,7 @@ public:
|
|||
|
||||
An example of using Accept():
|
||||
@verbatim
|
||||
TiXmlPrinter printer;
|
||||
XMLPrinter printer;
|
||||
tinyxmlDoc.Accept( &printer );
|
||||
const char* xmlcstr = printer.CStr();
|
||||
@endverbatim
|
||||
|
@ -818,9 +835,9 @@ private:
|
|||
A text node can have 2 ways to output the next. "normal" output
|
||||
and CDATA. It will default to the mode it was parsed from the XML file and
|
||||
you generally want to leave it alone, but you can change the output mode with
|
||||
SetCDATA() and query it with CDATA().
|
||||
SetCData() and query it with CData().
|
||||
*/
|
||||
class XMLText : public XMLNode
|
||||
class TINYXML2_LIB XMLText : public XMLNode
|
||||
{
|
||||
friend class XMLBase;
|
||||
friend class XMLDocument;
|
||||
|
@ -859,7 +876,7 @@ private:
|
|||
|
||||
|
||||
/** An XML Comment. */
|
||||
class XMLComment : public XMLNode
|
||||
class TINYXML2_LIB XMLComment : public XMLNode
|
||||
{
|
||||
friend class XMLDocument;
|
||||
public:
|
||||
|
@ -891,13 +908,13 @@ private:
|
|||
<?xml version="1.0" standalone="yes"?>
|
||||
@endverbatim
|
||||
|
||||
TinyXML2 will happily read or write files without a declaration,
|
||||
TinyXML-2 will happily read or write files without a declaration,
|
||||
however.
|
||||
|
||||
The text of the declaration isn't interpreted. It is parsed
|
||||
and written as a string.
|
||||
*/
|
||||
class XMLDeclaration : public XMLNode
|
||||
class TINYXML2_LIB XMLDeclaration : public XMLNode
|
||||
{
|
||||
friend class XMLDocument;
|
||||
public:
|
||||
|
@ -922,14 +939,14 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
/** Any tag that tinyXml doesn't recognize is saved as an
|
||||
/** Any tag that TinyXML-2 doesn't recognize is saved as an
|
||||
unknown. It is a tag of text, but should not be modified.
|
||||
It will be written back to the XML, unchanged, when the file
|
||||
is saved.
|
||||
|
||||
DTD tags get thrown into TiXmlUnknowns.
|
||||
DTD tags get thrown into XMLUnknowns.
|
||||
*/
|
||||
class XMLUnknown : public XMLNode
|
||||
class TINYXML2_LIB XMLUnknown : public XMLNode
|
||||
{
|
||||
friend class XMLDocument;
|
||||
public:
|
||||
|
@ -988,7 +1005,7 @@ enum XMLError {
|
|||
@note The attributes are not XMLNodes. You may only query the
|
||||
Next() attribute in a list.
|
||||
*/
|
||||
class XMLAttribute
|
||||
class TINYXML2_LIB XMLAttribute
|
||||
{
|
||||
friend class XMLElement;
|
||||
public:
|
||||
|
@ -1005,52 +1022,52 @@ public:
|
|||
return _next;
|
||||
}
|
||||
|
||||
/** IntAttribute interprets the attribute as an integer, and returns the value.
|
||||
/** IntValue interprets the attribute as an integer, and returns the value.
|
||||
If the value isn't an integer, 0 will be returned. There is no error checking;
|
||||
use QueryIntAttribute() if you need error checking.
|
||||
use QueryIntValue() if you need error checking.
|
||||
*/
|
||||
int IntValue() const {
|
||||
int i=0;
|
||||
QueryIntValue( &i );
|
||||
return i;
|
||||
}
|
||||
/// Query as an unsigned integer. See IntAttribute()
|
||||
/// Query as an unsigned integer. See IntValue()
|
||||
unsigned UnsignedValue() const {
|
||||
unsigned i=0;
|
||||
QueryUnsignedValue( &i );
|
||||
return i;
|
||||
}
|
||||
/// Query as a boolean. See IntAttribute()
|
||||
/// Query as a boolean. See IntValue()
|
||||
bool BoolValue() const {
|
||||
bool b=false;
|
||||
QueryBoolValue( &b );
|
||||
return b;
|
||||
}
|
||||
/// Query as a double. See IntAttribute()
|
||||
/// Query as a double. See IntValue()
|
||||
double DoubleValue() const {
|
||||
double d=0;
|
||||
QueryDoubleValue( &d );
|
||||
return d;
|
||||
}
|
||||
/// Query as a float. See IntAttribute()
|
||||
/// Query as a float. See IntValue()
|
||||
float FloatValue() const {
|
||||
float f=0;
|
||||
QueryFloatValue( &f );
|
||||
return f;
|
||||
}
|
||||
|
||||
/** QueryIntAttribute interprets the attribute as an integer, and returns the value
|
||||
in the provided paremeter. The function will return XML_NO_ERROR on success,
|
||||
/** QueryIntValue interprets the attribute as an integer, and returns the value
|
||||
in the provided parameter. The function will return XML_NO_ERROR on success,
|
||||
and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful.
|
||||
*/
|
||||
XMLError QueryIntValue( int* value ) const;
|
||||
/// See QueryIntAttribute
|
||||
/// See QueryIntValue
|
||||
XMLError QueryUnsignedValue( unsigned int* value ) const;
|
||||
/// See QueryIntAttribute
|
||||
/// See QueryIntValue
|
||||
XMLError QueryBoolValue( bool* value ) const;
|
||||
/// See QueryIntAttribute
|
||||
/// See QueryIntValue
|
||||
XMLError QueryDoubleValue( double* value ) const;
|
||||
/// See QueryIntAttribute
|
||||
/// See QueryIntValue
|
||||
XMLError QueryFloatValue( float* value ) const;
|
||||
|
||||
/// Set the attribute to a string value.
|
||||
|
@ -1069,7 +1086,7 @@ public:
|
|||
private:
|
||||
enum { BUF_SIZE = 200 };
|
||||
|
||||
XMLAttribute() : _next( 0 ) {}
|
||||
XMLAttribute() : _next( 0 ), _memPool( 0 ) {}
|
||||
virtual ~XMLAttribute() {}
|
||||
|
||||
XMLAttribute( const XMLAttribute& ); // not supported
|
||||
|
@ -1089,7 +1106,7 @@ private:
|
|||
and can contain other elements, text, comments, and unknowns.
|
||||
Elements also contain an arbitrary number of attributes.
|
||||
*/
|
||||
class XMLElement : public XMLNode
|
||||
class TINYXML2_LIB XMLElement : public XMLNode
|
||||
{
|
||||
friend class XMLBase;
|
||||
friend class XMLDocument;
|
||||
|
@ -1301,10 +1318,10 @@ public:
|
|||
const XMLAttribute* FindAttribute( const char* name ) const;
|
||||
|
||||
/** Convenience function for easy access to the text inside an element. Although easy
|
||||
and concise, GetText() is limited compared to getting the TiXmlText child
|
||||
and concise, GetText() is limited compared to getting the XMLText child
|
||||
and accessing it directly.
|
||||
|
||||
If the first child of 'this' is a TiXmlText, the GetText()
|
||||
If the first child of 'this' is a XMLText, the GetText()
|
||||
returns the character string of the Text node, else null is returned.
|
||||
|
||||
This is a convenient method for getting the text of simple contained text:
|
||||
|
@ -1409,7 +1426,7 @@ enum Whitespace {
|
|||
All Nodes are connected and allocated to a Document.
|
||||
If the Document is deleted, all its Nodes are also deleted.
|
||||
*/
|
||||
class XMLDocument : public XMLNode
|
||||
class TINYXML2_LIB XMLDocument : public XMLNode
|
||||
{
|
||||
friend class XMLElement;
|
||||
public:
|
||||
|
@ -1431,7 +1448,7 @@ public:
|
|||
|
||||
You may optionally pass in the 'nBytes', which is
|
||||
the number of bytes which will be parsed. If not
|
||||
specified, TinyXML will assume 'xml' points to a
|
||||
specified, TinyXML-2 will assume 'xml' points to a
|
||||
null terminated string.
|
||||
*/
|
||||
XMLError Parse( const char* xml, size_t nBytes=(size_t)(-1) );
|
||||
|
@ -1507,11 +1524,11 @@ public:
|
|||
Or you can use a printer to print to memory:
|
||||
@verbatim
|
||||
XMLPrinter printer;
|
||||
doc->Print( &printer );
|
||||
doc.Print( &printer );
|
||||
// printer.CStr() has a const char* to the XML
|
||||
@endverbatim
|
||||
*/
|
||||
void Print( XMLPrinter* streamer=0 );
|
||||
void Print( XMLPrinter* streamer=0 ) const;
|
||||
virtual bool Accept( XMLVisitor* visitor ) const;
|
||||
|
||||
/**
|
||||
|
@ -1614,7 +1631,7 @@ private:
|
|||
|
||||
/**
|
||||
A XMLHandle is a class that wraps a node pointer with null checks; this is
|
||||
an incredibly useful thing. Note that XMLHandle is not part of the TinyXML
|
||||
an incredibly useful thing. Note that XMLHandle is not part of the TinyXML-2
|
||||
DOM structure. It is a separate utility class.
|
||||
|
||||
Take an example:
|
||||
|
@ -1667,7 +1684,7 @@ private:
|
|||
|
||||
See also XMLConstHandle, which is the same as XMLHandle, but operates on const objects.
|
||||
*/
|
||||
class XMLHandle
|
||||
class TINYXML2_LIB XMLHandle
|
||||
{
|
||||
public:
|
||||
/// Create a handle from any node (at any depth of the tree.) This can be a null pointer.
|
||||
|
@ -1751,7 +1768,7 @@ private:
|
|||
A variant of the XMLHandle class for working with const XMLNodes and Documents. It is the
|
||||
same in all regards, except for the 'const' qualifiers. See XMLHandle for API.
|
||||
*/
|
||||
class XMLConstHandle
|
||||
class TINYXML2_LIB XMLConstHandle
|
||||
{
|
||||
public:
|
||||
XMLConstHandle( const XMLNode* node ) {
|
||||
|
@ -1829,7 +1846,7 @@ private:
|
|||
|
||||
@verbatim
|
||||
XMLPrinter printer;
|
||||
doc->Print( &printer );
|
||||
doc.Print( &printer );
|
||||
SomeFunction( printer.CStr() );
|
||||
@endverbatim
|
||||
|
||||
|
@ -1858,7 +1875,7 @@ private:
|
|||
printer.CloseElement();
|
||||
@endverbatim
|
||||
*/
|
||||
class XMLPrinter : public XMLVisitor
|
||||
class TINYXML2_LIB XMLPrinter : public XMLVisitor
|
||||
{
|
||||
public:
|
||||
/** Construct the printer. If the FILE* is specified,
|
||||
|
@ -1964,5 +1981,8 @@ private:
|
|||
|
||||
} // tinyxml2
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // TINYXML2_INCLUDED
|
||||
|
|
|
@ -237,7 +237,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;WIN32;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;TINYXML2_EXPORT;WIN32;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<AdditionalIncludeDirectories>..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4251;4512</DisableSpecificWarnings>
|
||||
|
@ -255,7 +255,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;TINYXML2_EXPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<AdditionalIncludeDirectories>..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4251;4512</DisableSpecificWarnings>
|
||||
|
@ -273,7 +273,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;WIN32;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;TINYXML2_EXPORT;WIN32;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<AdditionalIncludeDirectories>..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4251;4512</DisableSpecificWarnings>
|
||||
|
@ -290,7 +290,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;TINYXML2_EXPORT;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<AdditionalIncludeDirectories>..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4251;4512</DisableSpecificWarnings>
|
||||
|
@ -315,7 +315,7 @@
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<AdditionalIncludeDirectories>..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4251;4512</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;TINYXML2_EXPORT;NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
|
@ -341,7 +341,7 @@
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<AdditionalIncludeDirectories>..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4251;4512</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;TINYXML2_EXPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
|
@ -368,7 +368,7 @@
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<AdditionalIncludeDirectories>..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4251;4512</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;TINYXML2_EXPORT;NDEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
|
@ -394,7 +394,7 @@
|
|||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<AdditionalIncludeDirectories>..\externals;..\externals\tinyxml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4251;4512</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPPCHECKLIB_EXPORT;TINYXML2_EXPORT;NDEBUG;WIN32;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
|
|
|
@ -250,7 +250,7 @@
|
|||
<ClInclude Include="checkassert.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="environment.h">
|
||||
<ClInclude Include="library.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\externals\tinyxml\tinyxml2.h">
|
||||
|
|
Loading…
Reference in New Issue