summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-06-29 10:54:28 -0700
committerJosh Blum <josh@joshknows.com>2011-06-29 10:54:28 -0700
commitadbe1a0efe7598a9e0433675e2852aad2e280c62 (patch)
tree3ff0bec87ff979f091e3233bf06118670e2535fe /host/include
parentd2f79c07281604c1b48ec81f1cdb2754e97bbe65 (diff)
downloaduhd-adbe1a0efe7598a9e0433675e2852aad2e280c62.tar.gz
uhd-adbe1a0efe7598a9e0433675e2852aad2e280c62.tar.bz2
uhd-adbe1a0efe7598a9e0433675e2852aad2e280c62.zip
uhd: loopback working on usrp2
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/property_tree.ipp10
1 files changed, 4 insertions, 6 deletions
diff --git a/host/include/uhd/property_tree.ipp b/host/include/uhd/property_tree.ipp
index 1c61d4937..3dba6fb28 100644
--- a/host/include/uhd/property_tree.ipp
+++ b/host/include/uhd/property_tree.ipp
@@ -19,7 +19,6 @@
#define INCLUDED_UHD_PROPERTY_TREE_IPP
#include <boost/foreach.hpp>
-#include <boost/any.hpp>
#include <vector>
/***********************************************************************
@@ -51,23 +50,22 @@ public:
}
property<T> &set(const T &value){
- T new_value(_master.empty()? value : _master(value));
- _value = new_value; //shadow it
+ _value = boost::shared_ptr<T>(new T(_master.empty()? value : _master(value)));
BOOST_FOREACH(typename property<T>::subscriber_type &subscriber, _subscribers){
- subscriber(new_value); //let errors propagate
+ subscriber(*_value); //let errors propagate
}
return *this;
}
T get(void) const{
- return _publisher.empty()? boost::any_cast<T>(_value) : _publisher();
+ return _publisher.empty()? *_value : _publisher();
}
private:
std::vector<typename property<T>::subscriber_type> _subscribers;
typename property<T>::publisher_type _publisher;
typename property<T>::master_type _master;
- boost::any _value; //any type so we can assign structs w/ const members
+ boost::shared_ptr<T> _value;
};
}} //namespace uhd::/*anon*/