Update of /cvsroot/boost/boost/boost/graph/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31855

Modified Files:
        read_graphviz_spirit.hpp 
Log Message:
Fixed an inconsistency between explicit graph properties and implicit
(without a "graph" keyword and brackets).


Index: read_graphviz_spirit.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/detail/read_graphviz_spirit.hpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- read_graphviz_spirit.hpp    20 Jun 2007 16:24:06 -0000      1.19
+++ read_graphviz_spirit.hpp    21 Jun 2007 16:12:46 -0000      1.20
@@ -186,9 +186,9 @@
           = (ID[graph_stmt.key = arg1] >>
              ch_p('=') >>
              ID[graph_stmt.value = arg1])
-        [phoenix::bind(&definition::default_graph_prop)
+        [phoenix::bind(&definition::call_graph_prop)
          (var(*this),graph_stmt.key,graph_stmt.value)]
-        ; // Graph property -- ignore.
+        ; // Graph property.
 
       attr_stmt
           = (as_lower_d[keyword_p("graph")]
@@ -384,7 +384,7 @@
       }
     }
 
-    // default_graph_prop - Just ignore graph properties.
+    // default_graph_prop - Store as a graph property.
     void default_graph_prop(id_t const& key, id_t const& value) {
 #ifdef BOOST_GRAPH_DEBUG
       std::cout << key << " = " << value << std::endl;
@@ -445,6 +445,15 @@
         actor(lhs,rhs);
     }
 
+    void call_graph_prop(std::string const& lhs, std::string const& rhs) {
+      // If first and last characters of the rhs are double-quotes,
+      // remove them.
+      if (!rhs.empty() && rhs[0] == '"' && rhs[rhs.size() - 1] == '"')
+        this->default_graph_prop(lhs, rhs.substr(1, rhs.size()-2));
+      else
+        this->default_graph_prop(lhs,rhs);
+    }
+
     void set_node_property(node_t const& node, id_t const& key,
                            id_t const& value) {
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to