pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/worldmap dot.cxx,1.3,1.4 node_data.c


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldmap dot.cxx,1.3,1.4 node_data.cxx,1.8,1.9
Date: 18 Feb 2003 10:31:34 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/worldmap
In directory dark:/tmp/cvs-serv10023/worldmap

Modified Files:
        dot.cxx node_data.cxx 
Log Message:
more XMLFileReader action


Index: dot.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldmap/dot.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dot.cxx     13 Oct 2002 19:28:34 -0000      1.3
+++ dot.cxx     18 Feb 2003 10:31:32 -0000      1.4
@@ -18,6 +18,7 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <iostream>
+#include "../xml_file_reader.hxx"
 #include "dot.hxx"
 
 namespace WorldMapNS {
@@ -30,33 +31,11 @@
   std::cout << "Dot::Dot: " << cur->name << std::endl;
 
   // cur = <dot>...</dot>
-  cur = cur->children;
-  cur = XMLhelper::skip_blank(cur);
-         
-  while (cur)
-    {
-      std::cout << "cur->name: " << cur->name << std::endl;
 
-      if (XMLhelper::equal_str(cur->name, "position"))
-        {
-          pos = XMLhelper::parse_vector(doc, cur);
-        }
-      else if (XMLhelper::equal_str(cur->name, "name"))
-        {
-          if (!XMLhelper::node_list_get_string(doc, cur->children, 1, name))
-            {
-              std::cout << "couldn't parse name" << std::endl;
-            }
-        }
-      else
-        {
-          std::cout << "1234" << std::endl;
-        }
+  XMLFileReader reader(doc, cur);
+  reader.read_vector("position", pos);
+  reader.read_string("name", name);
 
-      cur = cur->next;
-      cur = XMLhelper::skip_blank(cur);
-    }
-  
   assert(!name.empty());
 }
 

Index: node_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldmap/node_data.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- node_data.cxx       28 Sep 2002 19:31:06 -0000      1.8
+++ node_data.cxx       18 Feb 2003 10:31:32 -0000      1.9
@@ -161,7 +161,7 @@
   if (accessible)
     node->accessible = StringConverter::to_int (accessible);
   */
-
+  assert(0);
   cur = cur->children;
 
   while (cur)
@@ -172,6 +172,7 @@
          continue;
        }
 
+      
       if (XMLhelper::equal_str(cur->name, "position"))
        {
          node->pos = XMLhelper::parse_vector (doc, cur);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]