[Orxonox-commit 3416] r8103 - code/branches/kicklib/src/external/tinyxml

rgrieder at orxonox.net rgrieder at orxonox.net
Tue Mar 22 15:22:55 CET 2011


Author: rgrieder
Date: 2011-03-22 15:22:54 +0100 (Tue, 22 Mar 2011)
New Revision: 8103

Modified:
   code/branches/kicklib/src/external/tinyxml/CMakeLists.txt
   code/branches/kicklib/src/external/tinyxml/VERSION
   code/branches/kicklib/src/external/tinyxml/changes_orxonox.diff
   code/branches/kicklib/src/external/tinyxml/ticpp.cpp
   code/branches/kicklib/src/external/tinyxml/ticpp.h
Log:
Updated TiCpp.

Modified: code/branches/kicklib/src/external/tinyxml/CMakeLists.txt
===================================================================
--- code/branches/kicklib/src/external/tinyxml/CMakeLists.txt	2011-03-21 15:37:51 UTC (rev 8102)
+++ code/branches/kicklib/src/external/tinyxml/CMakeLists.txt	2011-03-22 14:22:54 UTC (rev 8103)
@@ -35,8 +35,6 @@
 ORXONOX_ADD_LIBRARY(tinyxml_orxonox
   ORXONOX_EXTERNAL
   NO_DLL_INTERFACE
-  VERSION
-    2.5.3
   SOURCE_FILES
     ${TINYXML_FILES}
 )

Modified: code/branches/kicklib/src/external/tinyxml/VERSION
===================================================================
--- code/branches/kicklib/src/external/tinyxml/VERSION	2011-03-21 15:37:51 UTC (rev 8102)
+++ code/branches/kicklib/src/external/tinyxml/VERSION	2011-03-22 14:22:54 UTC (rev 8103)
@@ -1 +1,2 @@
-TinyXML++ trunk checkout revision 106. Built on top of TinyXML 2.5.3
+TinyXML++ trunk checkout revision 122 (version 0.04a).
+Built with TinyXML 2.5.3.

Modified: code/branches/kicklib/src/external/tinyxml/changes_orxonox.diff
===================================================================
--- code/branches/kicklib/src/external/tinyxml/changes_orxonox.diff	2011-03-21 15:37:51 UTC (rev 8102)
+++ code/branches/kicklib/src/external/tinyxml/changes_orxonox.diff	2011-03-22 14:22:54 UTC (rev 8103)
@@ -1,18 +1,35 @@
---- ticpp.h	Tue Nov  4 21:55:49 2008
-+++ ticpp.h	Sat Jan 10 14:48:41 2009
-@@ -1229,6 +1229,7 @@
+--- ticpp.h
++++ ticpp.h
+@@ -38,9 +38,7 @@
+ @todo add TYPECOUNT support. See ticpp::NodeFactory.
+ @todo Add a quick reference
+ */
+-#ifndef TIXML_USE_TICPP
+-	#define TIXML_USE_TICPP
+-#endif
++#ifdef TIXML_USE_TICPP
  
+ #ifndef TICPP_INCLUDED
+ #define TICPP_INCLUDED
+@@ -1231,6 +1229,7 @@
+ 
  		T* m_tiXmlPointer;		/**< Internal pointer to the TiXml Class which is being wrapped */
  
-+    public:
++	public:
  		/**
  		@internal
  		Gets the internal TinyXML pointer.
-@@ -1240,6 +1241,7 @@
+@@ -1242,6 +1241,7 @@
  			ValidatePointer();
  			return m_tiXmlPointer;
  		}
-+    protected:
++	protected:
  
  		/**
  		@internal
+@@ -1903,3 +1903,5 @@
+ }
+ 
+ #endif	// TICPP_INCLUDED
++
++#endif // TIXML_USE_TICPP

Modified: code/branches/kicklib/src/external/tinyxml/ticpp.cpp
===================================================================
--- code/branches/kicklib/src/external/tinyxml/ticpp.cpp	2011-03-21 15:37:51 UTC (rev 8102)
+++ code/branches/kicklib/src/external/tinyxml/ticpp.cpp	2011-03-22 14:22:54 UTC (rev 8103)
@@ -369,7 +369,7 @@
 	return NodeFactory( pointer, false );
 }
 
-Node* Node::InsertEndChild( Node& addThis )
+Node* Node::InsertEndChild( const Node& addThis )
 {
 	if ( addThis.Type() == TiXmlNode::DOCUMENT )
 	{
@@ -403,7 +403,7 @@
 	return childNode;
 }
 
-Node* Node::InsertBeforeChild( Node* beforeThis, Node& addThis )
+Node* Node::InsertBeforeChild( Node* beforeThis, const Node& addThis )
 {
 	if ( addThis.Type() == TiXmlNode::DOCUMENT )
 	{
@@ -422,7 +422,7 @@
 	return NodeFactory( pointer );
 }
 
-Node* Node::InsertAfterChild( Node* afterThis, Node& addThis )
+Node* Node::InsertAfterChild( Node* afterThis, const Node& addThis )
 {
 	if ( addThis.Type() == TiXmlNode::DOCUMENT )
 	{
@@ -441,7 +441,7 @@
 	return NodeFactory( pointer );
 }
 
-Node* Node::ReplaceChild( Node* replaceThis, Node& withThis )
+Node* Node::ReplaceChild( Node* replaceThis, const Node& withThis )
 {
 	if ( withThis.Type() == TiXmlNode::DOCUMENT )
 	{

Modified: code/branches/kicklib/src/external/tinyxml/ticpp.h
===================================================================
--- code/branches/kicklib/src/external/tinyxml/ticpp.h	2011-03-21 15:37:51 UTC (rev 8102)
+++ code/branches/kicklib/src/external/tinyxml/ticpp.h	2011-03-22 14:22:54 UTC (rev 8103)
@@ -224,7 +224,7 @@
 		{
 			return ( GetBasePointer() == rhs.GetBasePointer() );
 		}
-		
+
 		/**
 		Compare internal TiXml pointers to determine is both are wrappers around the same node
 		*/
@@ -232,7 +232,7 @@
 		{
 			return ( GetBasePointer() != rhs.GetBasePointer() );
 		}
-		
+
 		/**
 		Builds detailed error string using TiXmlDocument::Error() and others
 		*/
@@ -249,8 +249,8 @@
 					if ( doc->Error() )
 					{
 						full_message 	<< "\nDescription: " << doc->ErrorDesc()
-										<< "\nFile: " << (strlen( doc->Value() ) > 0 ? doc->Value() : "<unnamed-file>") 
-										<< "\nLine: " << doc->ErrorRow() 
+										<< "\nFile: " << (strlen( doc->Value() ) > 0 ? doc->Value() : "<unnamed-file>")
+										<< "\nLine: " << doc->ErrorRow()
 										<< "\nColumn: " << doc->ErrorCol();
 					}
 				}
@@ -286,7 +286,7 @@
 			{
 				TICPPTHROW( "Internal TiXml Pointer is NULL" );
 			}
-		}		
+		}
 
 		/**
 		@internal
@@ -616,7 +616,7 @@
 		@see LinkEndChild
 		@see TiXmlNode::InsertEndChild
 		*/
-		Node* InsertEndChild( Node& addThis );
+		Node* InsertEndChild( const Node& addThis );
 
 		/**
 		Adds a child past the LastChild.
@@ -641,7 +641,7 @@
 		@see InsertAfterChild
 		@see TiXmlNode::InsertBeforeChild
 		*/
-		Node* InsertBeforeChild( Node* beforeThis, Node& addThis );
+		Node* InsertBeforeChild( Node* beforeThis, const Node& addThis );
 
 		/**
 		Adds a child after the specified child.
@@ -654,7 +654,7 @@
 		@see InsertBeforeChild
 		@see TiXmlNode::InsertAfterChild
 		*/
-		Node* InsertAfterChild( Node* afterThis, Node& addThis );
+		Node* InsertAfterChild( Node* afterThis, const Node& addThis );
 
 		/**
 		Replace a child of this node.
@@ -666,7 +666,7 @@
 
 		@see TiXmlNode::ReplaceChild
 		*/
-		Node* ReplaceChild( Node* replaceThis, Node& withThis );
+		Node* ReplaceChild( Node* replaceThis, const Node& withThis );
 
 		/**
 		Delete a child of this node.
@@ -1162,7 +1162,7 @@
 
 		/** Sets internal pointer to the Previous Sibling, or Iterator::END, if there are no prior siblings */
 		Iterator operator--(int)
-		{			
+		{
 			Iterator tmp(*this);
 			--(*this);
 			return tmp;
@@ -1229,7 +1229,7 @@
 
 		T* m_tiXmlPointer;		/**< Internal pointer to the TiXml Class which is being wrapped */
 
-    public:
+	public:
 		/**
 		@internal
 		Gets the internal TinyXML pointer.
@@ -1241,7 +1241,7 @@
 			ValidatePointer();
 			return m_tiXmlPointer;
 		}
-    protected:
+	protected:
 
 		/**
 		@internal
@@ -1399,11 +1399,12 @@
 		Document( const char* documentName );
 
 		/**
-		Constructor.
-		Create a document with a name. The name of the document is also the filename of the xml.
-
-		@param documentName Name to set in the Document.
-		*/
+		 * Constructor.
+		 * Create a document with a name. The name of the document is also the filename of the xml.
+		 * @param documentName Name to set in the Document.
+		 * @note LoadFile() needs to be called to actually load the data from the file specified by documentName
+		 * 		 SaveFile() needs to be called to save data to file specified by documentName.
+		 */
 		Document( const std::string& documentName );
 
 		/**
@@ -1748,7 +1749,8 @@
 			{
 				if ( throwIfNotFound )
 				{
-					TICPPTHROW( "Attribute does not exist" );
+					const std::string error( std::string( "Attribute '" ) + name + std::string( "' does not exist" ) );
+					TICPPTHROW( error );
 				}
 			}
 			else
@@ -1780,7 +1782,8 @@
 			{
 				if ( throwIfNotFound )
 				{
-					TICPPTHROW( "Attribute does not exist" );
+					const std::string error( std::string( "Attribute '" ) + name + std::string( "' does not exist" ) );
+					TICPPTHROW( error );
 				}
 				else
 				{




More information about the Orxonox-commit mailing list