Skip to content

Loading…

Fixed CMakeLists.txt for moved .xml files, typos #24

Merged
merged 3 commits into from

2 participants

@pzychotic

Getting the CMakeLists.txt in line with the latest changes that moved the .xml files into the resource folder.
Also, fixed various typos in the code documentation.

@leethomason leethomason merged commit 08bdf50 into leethomason:master
@leethomason
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 29 additions and 30 deletions.
  1. +4 −5 CMakeLists.txt
  2. +25 −25 tinyxml2.h
View
9 CMakeLists.txt
@@ -20,15 +20,14 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
${TARGET_DATA_COPY}
COMMAND ${CMAKE_COMMAND} -E echo "In source build")
else(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
+ make_directory(${CMAKE_CURRENT_BINARY_DIR}/resources/)
add_custom_target(
${TARGET_DATA_COPY}
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/dream.xml ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/utf8test.xml ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/utf8testverify.xml ${CMAKE_CURRENT_BINARY_DIR})
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/dream.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/utf8test.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/utf8testverify.xml ${CMAKE_CURRENT_BINARY_DIR}/resources/)
endif(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
-set(OGL_DATA_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data)
-
################################
# Add definitions
View
50 tinyxml2.h
@@ -225,7 +225,7 @@ class DynArray
/*
- Parent virtual class a a pool for fast allocation
+ Parent virtual class of a pool for fast allocation
and deallocation of objects.
*/
class MemPool
@@ -314,16 +314,16 @@ class MemPoolT : public MemPool
Implements the interface to the "Visitor pattern" (see the Accept() method.)
If you call the Accept() method, it requires being passed a XMLVisitor
class to handle callbacks. For nodes that contain other nodes (Document, Element)
- you will get called with a VisitEnter/VisitExit pair. Nodes that are always leaves
+ you will get called with a VisitEnter/VisitExit pair. Nodes that are always leafs
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 sibilings</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 suppert Visiting.
+ Generally Accept() is called on the TiXmlDocument, although all nodes support visiting.
You should never change the document from a callback.
@@ -344,13 +344,13 @@ class XMLVisitor
/// Visit an element.
virtual bool VisitExit( const XMLElement& /*element*/ ) { return true; }
- /// Visit a declaration
+ /// Visit a declaration.
virtual bool Visit( const XMLDeclaration& /*declaration*/ ) { return true; }
- /// Visit a text node
+ /// Visit a text node.
virtual bool Visit( const XMLText& /*text*/ ) { return true; }
- /// Visit a comment node
+ /// Visit a comment node.
virtual bool Visit( const XMLComment& /*comment*/ ) { return true; }
- /// Visit an unknown node
+ /// Visit an unknown node.
virtual bool Visit( const XMLUnknown& /*unknown*/ ) { return true; }
};
@@ -398,7 +398,7 @@ class XMLUtil
The type of a XMLNode can be queried, and it can
be cast to its more defined type.
- An XMLDocument allocates memory for all its Nodes.
+ A XMLDocument allocates memory for all its Nodes.
When the XMLDocument gets deleted, all its Nodes
will also be deleted.
@@ -443,7 +443,7 @@ class XMLNode
/** The meaning of 'value' changes for the specific type.
@verbatim
- Document: empy
+ Document: empty
Element: name of the element
Comment: the comment text
Unknown: the tag contents
@@ -542,7 +542,7 @@ class XMLNode
*/
virtual bool ShallowEqual( const XMLNode* compare ) const = 0;
- /** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the
+ /** Accept a hierarchical visit of the nodes in the TinyXML DOM. Every node in the
XML tree will be conditionally visited and the host will be called back
via the TiXmlVisitor interface.
@@ -869,9 +869,9 @@ class XMLElement : public XMLNode
/// See IntAttribute()
bool BoolAttribute( const char* name ) const { bool b=false; QueryBoolAttribute( name, &b ); return b; }
/// See IntAttribute()
- double DoubleAttribute( const char* name ) const { double d=0; QueryDoubleAttribute( name, &d ); return d; }
+ double DoubleAttribute( const char* name ) const { double d=0; QueryDoubleAttribute( name, &d ); return d; }
/// See IntAttribute()
- float FloatAttribute( const char* name ) const { float f=0; QueryFloatAttribute( name, &f ); return f; }
+ float FloatAttribute( const char* name ) const { float f=0; QueryFloatAttribute( name, &f ); return f; }
/** Given an attribute name, QueryIntAttribute() returns
XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion
@@ -886,7 +886,7 @@ class XMLElement : public XMLNode
QueryIntAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
@endverbatim
*/
- int QueryIntAttribute( const char* name, int* _value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryIntValue( _value ); }
+ int QueryIntAttribute( const char* name, int* _value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryIntValue( _value ); }
/// See QueryIntAttribute()
int QueryUnsignedAttribute( const char* name, unsigned int* _value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryUnsignedValue( _value ); }
/// See QueryIntAttribute()
@@ -894,7 +894,7 @@ class XMLElement : public XMLNode
/// See QueryIntAttribute()
int QueryDoubleAttribute( const char* name, double* _value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryDoubleValue( _value ); }
/// See QueryIntAttribute()
- int QueryFloatAttribute( const char* name, float* _value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryFloatValue( _value ); }
+ int QueryFloatAttribute( const char* name, float* _value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) return XML_NO_ATTRIBUTE; return a->QueryFloatValue( _value ); }
/// Sets the named attribute to value.
void SetAttribute( const char* name, const char* _value ) { XMLAttribute* a = FindOrCreateAttribute( name ); a->SetAttribute( _value ); }
@@ -905,7 +905,7 @@ class XMLElement : public XMLNode
/// Sets the named attribute to value.
void SetAttribute( const char* name, bool _value ) { XMLAttribute* a = FindOrCreateAttribute( name ); a->SetAttribute( _value ); }
/// Sets the named attribute to value.
- void SetAttribute( const char* name, double _value ) { XMLAttribute* a = FindOrCreateAttribute( name ); a->SetAttribute( _value ); }
+ void SetAttribute( const char* name, double _value ) { XMLAttribute* a = FindOrCreateAttribute( name ); a->SetAttribute( _value ); }
/**
Delete an attribute.
@@ -977,7 +977,7 @@ class XMLElement : public XMLNode
};
-/** A document binds together all the functionality.
+/** A Document binds together all the functionality.
It can be saved, loaded, and printed to the screen.
All Nodes are connected and allocated to a Document.
If the Document is deleted, all its Nodes are also deleted.
@@ -1024,7 +1024,7 @@ class XMLDocument : public XMLNode
int SaveFile( const char* filename );
/**
- Save the XML file to disk. You are responsible
+ Save the XML file to disk. You are responsible
for providing and closing the FILE*.
Returns XML_NO_ERROR (0) on success, or
@@ -1103,7 +1103,7 @@ class XMLDocument : public XMLNode
XMLUnknown* NewUnknown( const char* text );
/**
- Delete a node associated with this documented.
+ Delete a node associated with this document.
It will be unlinked from the DOM.
*/
void DeleteNode( XMLNode* node ) { node->parent->DeleteChild( node ); }
@@ -1116,9 +1116,9 @@ class XMLDocument : public XMLNode
int ErrorID() const { return errorID; }
/// Return a possibly helpful diagnostic location or string.
const char* GetErrorStr1() const { return errorStr1; }
- /// Return possibly helpful secondary diagnostic location or string.
+ /// Return a possibly helpful secondary diagnostic location or string.
const char* GetErrorStr2() const { return errorStr2; }
- /// If there is an error, print it to stdout
+ /// If there is an error, print it to stdout.
void PrintError() const;
// internal
@@ -1158,7 +1158,7 @@ class XMLDocument : public XMLNode
<Child attributeB = "value1" />
<Child attributeB = "value2" />
</Element>
- <Document>
+ </Document>
@endverbatim
Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very
@@ -1286,7 +1286,7 @@ class XMLConstHandle
It can:
-# Print to memory.
- -# Print to a file you provide
+ -# Print to a file you provide.
-# Print XML without a XMLDocument.
Print to Memory
@@ -1294,7 +1294,7 @@ class XMLConstHandle
@verbatim
XMLPrinter printer;
doc->Print( &printer );
- SomeFunctior( printer.CStr() );
+ SomeFunction( printer.CStr() );
@endverbatim
Print to a File
@@ -1349,7 +1349,7 @@ class XMLPrinter : public XMLVisitor
/// Add a text node.
void PushText( const char* text, bool cdata=false );
- /// Add a comment
+ /// Add a comment.
void PushComment( const char* comment );
void PushDeclaration( const char* value );
Something went wrong with that request. Please try again.