summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-08 10:08:43 -0700
committerJosh Blum <josh@joshknows.com>2011-07-08 10:08:43 -0700
commitaa6b340f436acf4c0cad80416f69312ecfe3f29f (patch)
treef417acc5e12c1837537e1bc6eec4ee638fdf941d /host/include
parent89c68baaf23a29d8bcb4ff11a1a743aa13ceb34d (diff)
downloaduhd-aa6b340f436acf4c0cad80416f69312ecfe3f29f.tar.gz
uhd-aa6b340f436acf4c0cad80416f69312ecfe3f29f.tar.bz2
uhd-aa6b340f436acf4c0cad80416f69312ecfe3f29f.zip
uhd: added subtree capability to property tree
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/property_tree.hpp9
-rw-r--r--host/include/uhd/usrp/dboard_manager.hpp4
2 files changed, 7 insertions, 6 deletions
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<std::string> list(const path_type &path) = 0;
+ virtual std::vector<std::string> list(const path_type &path) const = 0;
//! Create a new property entry in the tree
template <typename T> property<T> &create(const path_type &path);
@@ -129,7 +132,7 @@ private:
virtual void _create(const path_type &path, const boost::shared_ptr<void> &prop) = 0;
//! Internal access property with wild-card type
- virtual boost::shared_ptr<void> &_access(const path_type &path) = 0;
+ virtual boost::shared_ptr<void> &_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)