From aa6b340f436acf4c0cad80416f69312ecfe3f29f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 8 Jul 2011 10:08:43 -0700 Subject: uhd: added subtree capability to property tree --- host/include/uhd/property_tree.hpp | 9 ++++++--- host/include/uhd/usrp/dboard_manager.hpp | 4 +--- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/property_tree.hpp b/host/include/uhd/property_tree.hpp index c41a129b1..cd8cba7e5 100644 --- a/host/include/uhd/property_tree.hpp +++ b/host/include/uhd/property_tree.hpp @@ -109,14 +109,17 @@ public: //! Create a new + empty property tree static sptr make(void); + //! Get a subtree with a new root starting at path + virtual sptr subtree(const path_type &path) const = 0; + //! Remove a property or directory (recursive) virtual void remove(const path_type &path) = 0; //! True if the path exists in the tree - virtual bool exists(const path_type &path) = 0; + virtual bool exists(const path_type &path) const = 0; //! Get an iterable to all things in the given path - virtual std::vector list(const path_type &path) = 0; + virtual std::vector list(const path_type &path) const = 0; //! Create a new property entry in the tree template property &create(const path_type &path); @@ -129,7 +132,7 @@ private: virtual void _create(const path_type &path, const boost::shared_ptr &prop) = 0; //! Internal access property with wild-card type - virtual boost::shared_ptr &_access(const path_type &path) = 0; + virtual boost::shared_ptr &_access(const path_type &path) const = 0; }; diff --git a/host/include/uhd/usrp/dboard_manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp index 84808ea72..091769a5c 100644 --- a/host/include/uhd/usrp/dboard_manager.hpp +++ b/host/include/uhd/usrp/dboard_manager.hpp @@ -39,9 +39,7 @@ public: //! It does what it says... static void populate_prop_tree_from_subdev( - property_tree::sptr tree, - const property_tree::path_type &root, - wax::obj subdev + property_tree::sptr subtree, wax::obj subdev ); //dboard constructor (each dboard should have a ::make with this signature) -- cgit v1.2.3