aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/property_tree.hpp7
-rw-r--r--host/include/uhd/property_tree.ipp6
2 files changed, 13 insertions, 0 deletions
diff --git a/host/include/uhd/property_tree.hpp b/host/include/uhd/property_tree.hpp
index 42e73458f..11b92393a 100644
--- a/host/include/uhd/property_tree.hpp
+++ b/host/include/uhd/property_tree.hpp
@@ -243,7 +243,14 @@ public:
template <typename T>
property<T>& access(const fs_path& path);
+ //! Pop a property off the tree, and returns the property
+ template <typename T>
+ boost::shared_ptr<property<T> > pop(const fs_path& path);
+
private:
+ //! Internal pop function
+ virtual boost::shared_ptr<void> _pop(const fs_path& path) = 0;
+
//! Internal create property with wild-card type
virtual void _create(const fs_path& path, const boost::shared_ptr<void>& prop) = 0;
diff --git a/host/include/uhd/property_tree.ipp b/host/include/uhd/property_tree.ipp
index de1ac28c0..ca5d6904f 100644
--- a/host/include/uhd/property_tree.ipp
+++ b/host/include/uhd/property_tree.ipp
@@ -192,6 +192,12 @@ property<T>& property_tree::access(const fs_path& path)
return *boost::static_pointer_cast<property<T> >(this->_access(path));
}
+template <typename T>
+typename boost::shared_ptr<property<T> > property_tree::pop(const fs_path& path)
+{
+ return boost::static_pointer_cast<property<T> >(this->_pop(path));
+}
+
} // namespace uhd
#endif /* INCLUDED_UHD_PROPERTY_TREE_IPP */