From 89152d1ffe452438db46932ebc62d5ccc5b79208 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 5 Feb 2010 11:36:17 -0800 Subject: Made get_link the only way to create nested props. Removed the obj::ptr and sptr typedefs. The dboard manager now must store not the subdevs, but their proxies. --- include/usrp_uhd/gain_handler.hpp | 4 ++-- include/usrp_uhd/usrp/dboard/manager.hpp | 11 ++++++----- include/usrp_uhd/wax.hpp | 12 ++++++------ 3 files changed, 14 insertions(+), 13 deletions(-) (limited to 'include/usrp_uhd') diff --git a/include/usrp_uhd/gain_handler.hpp b/include/usrp_uhd/gain_handler.hpp index 22e987803..786db993b 100644 --- a/include/usrp_uhd/gain_handler.hpp +++ b/include/usrp_uhd/gain_handler.hpp @@ -31,7 +31,7 @@ public: typedef boost::shared_ptr sptr; template gain_handler( - wax::obj::ptr wax_obj_ptr, const T &gain_prop, + wax::obj *wax_obj_ptr, const T &gain_prop, const T &gain_min_prop, const T &gain_max_prop, const T &gain_step_prop, const T &gain_names_prop ){ @@ -63,7 +63,7 @@ public: private: - wax::obj::ptr _wax_obj_ptr; + wax::obj *_wax_obj_ptr; wax::obj _gain_prop; wax::obj _gain_min_prop; wax::obj _gain_max_prop; diff --git a/include/usrp_uhd/usrp/dboard/manager.hpp b/include/usrp_uhd/usrp/dboard/manager.hpp index e4eb76bcf..8cc5658d9 100644 --- a/include/usrp_uhd/usrp/dboard/manager.hpp +++ b/include/usrp_uhd/usrp/dboard/manager.hpp @@ -66,14 +66,15 @@ public: //interface prop_names_t get_rx_subdev_names(void); prop_names_t get_tx_subdev_names(void); - wax::obj::sptr get_rx_subdev(const std::string &subdev_name); - wax::obj::sptr get_tx_subdev(const std::string &subdev_name); + wax::obj get_rx_subdev(const std::string &subdev_name); + wax::obj get_tx_subdev(const std::string &subdev_name); private: //list of rx and tx dboards in this manager - //each dboard here is actually a subdevice - std::map _rx_dboards; - std::map _tx_dboards; + //each dboard here is actually a subdevice proxy + //the subdevice proxy is internal to the cpp file + std::map _rx_dboards; + std::map _tx_dboards; }; }}} //namespace diff --git a/include/usrp_uhd/wax.hpp b/include/usrp_uhd/wax.hpp index f0e7a3acc..29a96cdb6 100644 --- a/include/usrp_uhd/wax.hpp +++ b/include/usrp_uhd/wax.hpp @@ -19,7 +19,6 @@ #define INCLUDED_WAX_HPP #include -#include #include /*! @@ -45,8 +44,6 @@ namespace wax{ - typedef boost::bad_any_cast bad_cast; - /*! * WAX object base class: * @@ -61,9 +58,6 @@ namespace wax{ */ class obj{ public: - //obj pointer typedefs - typedef boost::shared_ptr sptr; - typedef obj* ptr; /*! * Default constructor: @@ -150,6 +144,12 @@ namespace wax{ }; + /*! + * The wax::bad cast will be thrown when + * cast is called with the wrong typeid. + */ + typedef boost::bad_any_cast bad_cast; + /*! * Cast a wax::obj into the desired obj. * Usage wax::cast(my_value). -- cgit v1.2.3