[Liblas-commits] hg: Added ::boost:: qualifcation to optional and multi_index typ...

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Aug 24 11:36:48 EDT 2010


changeset 1993c9a1648d in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=1993c9a1648d
summary: Added ::boost:: qualifcation to optional and multi_index types used within property_tree - required after moving property_tree to liblas namespace.

diffstat:

 include/liblas/property_tree/detail/ptree_implementation.hpp |  20 ++++++------
 include/liblas/property_tree/string_path.hpp                 |   2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diffs (90 lines):

diff -r bc13be248ea8 -r 1993c9a1648d include/liblas/property_tree/detail/ptree_implementation.hpp
--- a/include/liblas/property_tree/detail/ptree_implementation.hpp	Tue Aug 24 16:12:37 2010 +0100
+++ b/include/liblas/property_tree/detail/ptree_implementation.hpp	Tue Aug 24 16:40:49 2010 +0100
@@ -43,10 +43,10 @@
             >
         > base_container;
 #else
-        typedef multi_index_container<value_type,
+        typedef ::boost::multi_index_container<value_type,
             ::boost::multi_index::indexed_by<
                 ::boost::multi_index::sequenced<>,
-                ::boost::multi_index::ordered_non_unique<::boost::multi_index::tag<by_name>,
+                ::boost::multi_index::ordered_non_unique< ::boost::multi_index::tag<by_name>,
                     ::boost::multi_index::member<value_type, const key_type,
                                         &value_type::first>,
                     key_compare
@@ -583,7 +583,7 @@
         path_type p(path);
         self_type *n = walk_path(p);
         if (!n) {
-            return optional<self_type&>();
+            return ::boost::optional<self_type&>();
         }
         return *n;
     }
@@ -595,7 +595,7 @@
         path_type p(path);
         self_type *n = walk_path(p);
         if (!n) {
-            return optional<const self_type&>();
+            return ::boost::optional<const self_type&>();
         }
         return *n;
     }
@@ -772,11 +772,11 @@
     ::boost::optional<Type> basic_ptree<K, D, C>::get_optional(const path_type &path,
                                                          Translator tr) const
     {
-        if (optional<const self_type&> child = get_child_optional(path))
+        if (::boost::optional<const self_type&> child = get_child_optional(path))
             return child.get().
                 BOOST_NESTED_TEMPLATE get_value_optional<Type>(tr);
         else
-            return optional<Type>();
+            return ::boost::optional<Type>();
     }
 
     template<class K, class D, class C>
@@ -784,17 +784,17 @@
     ::boost::optional<Type> basic_ptree<K, D, C>::get_optional(
                                                 const path_type &path) const
     {
-        if (optional<const self_type&> child = get_child_optional(path))
+        if (::boost::optional<const self_type&> child = get_child_optional(path))
             return child.get().BOOST_NESTED_TEMPLATE get_value_optional<Type>();
         else
-            return optional<Type>();
+            return ::boost::optional<Type>();
     }
 
     template<class K, class D, class C>
     template<class Type, class Translator>
     void basic_ptree<K, D, C>::put_value(const Type &value, Translator tr)
     {
-        if(optional<data_type> o = tr.put_value(value)) {
+        if(::boost::optional<data_type> o = tr.put_value(value)) {
             data() = *o;
         } else {
             BOOST_PROPERTY_TREE_THROW(ptree_bad_data(
@@ -815,7 +815,7 @@
     basic_ptree<K, D, C> & basic_ptree<K, D, C>::put(
         const path_type &path, const Type &value, Translator tr)
     {
-        if(optional<self_type &> child = get_child_optional(path)) {
+        if(::boost::optional<self_type &> child = get_child_optional(path)) {
             child.get().put_value(value, tr);
             return *child;
         } else {
diff -r bc13be248ea8 -r 1993c9a1648d include/liblas/property_tree/string_path.hpp
--- a/include/liblas/property_tree/string_path.hpp	Tue Aug 24 16:12:37 2010 +0100
+++ b/include/liblas/property_tree/string_path.hpp	Tue Aug 24 16:40:49 2010 +0100
@@ -211,7 +211,7 @@
           ++m_start;
         }
 
-        if(optional<key_type> key = m_tr.get_value(part)) {
+        if(::boost::optional<key_type> key = m_tr.get_value(part)) {
             return *key;
         }
         BOOST_PROPERTY_TREE_THROW(ptree_bad_path("Path syntax error", *this));


More information about the Liblas-commits mailing list