summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-22 10:26:48 -0700
committerJosh Blum <josh@joshknows.com>2010-07-22 10:26:48 -0700
commitf1fe66acd4fd32fe0f99548f11e8f4ab28b4c9f1 (patch)
tree9dff5e16ea44c76baefeeab5c8d5a7c26566e67e /host/lib/usrp
parent02be26f6b89869cb7f3ced716cf5447b913d58d5 (diff)
downloaduhd-f1fe66acd4fd32fe0f99548f11e8f4ab28b4c9f1.tar.gz
uhd-f1fe66acd4fd32fe0f99548f11e8f4ab28b4c9f1.tar.bz2
uhd-f1fe66acd4fd32fe0f99548f11e8f4ab28b4c9f1.zip
usrp: changed opaque pointer implementation for dboard contructor args
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/dboard_base.cpp6
-rw-r--r--host/lib/usrp/dboard_ctor_args.hpp20
-rw-r--r--host/lib/usrp/dboard_manager.cpp2
3 files changed, 16 insertions, 12 deletions
diff --git a/host/lib/usrp/dboard_base.cpp b/host/lib/usrp/dboard_base.cpp
index eafb8897f..6c4e29d9e 100644
--- a/host/lib/usrp/dboard_base.cpp
+++ b/host/lib/usrp/dboard_base.cpp
@@ -26,12 +26,12 @@ using namespace uhd::usrp;
* dboard_base dboard dboard_base class
**********************************************************************/
struct dboard_base::impl{
- ctor_args_impl args;
- impl(ctor_args_t args) : args(*args){}
+ dboard_ctor_args_t args;
};
dboard_base::dboard_base(ctor_args_t args){
- _impl = UHD_PIMPL_MAKE(impl, (args));
+ _impl = UHD_PIMPL_MAKE(impl, ());
+ _impl->args = *static_cast<dboard_ctor_args_t *>(args);
}
dboard_base::~dboard_base(void){
diff --git a/host/lib/usrp/dboard_ctor_args.hpp b/host/lib/usrp/dboard_ctor_args.hpp
index 13abe79e8..708f2ea08 100644
--- a/host/lib/usrp/dboard_ctor_args.hpp
+++ b/host/lib/usrp/dboard_ctor_args.hpp
@@ -15,18 +15,22 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#ifndef INCLUDED_DBOARD_CTOR_ARGS_HPP
-#define INCLUDED_DBOARD_CTOR_ARGS_HPP
+#ifndef INCLUDED_LIBUHD_USRP_DBOARD_CTOR_ARGS_HPP
+#define INCLUDED_LIBUHD_USRP_DBOARD_CTOR_ARGS_HPP
#include <uhd/usrp/dboard_id.hpp>
#include <uhd/usrp/dboard_base.hpp>
#include <uhd/usrp/dboard_iface.hpp>
#include <string>
-struct uhd::usrp::dboard_base::ctor_args_impl{
- std::string sd_name;
- dboard_iface::sptr db_iface;
- dboard_id_t rx_id, tx_id;
-};
+namespace uhd{ namespace usrp{
-#endif /* INCLUDED_DBOARD_CTOR_ARGS_HPP */
+ struct dboard_ctor_args_t{
+ std::string sd_name;
+ dboard_iface::sptr db_iface;
+ dboard_id_t rx_id, tx_id;
+ };
+
+}} //namespace
+
+#endif /* INCLUDED_LIBUHD_USRP_DBOARD_CTOR_ARGS_HPP */
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index 6321e018f..bfaaf0969 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -242,7 +242,7 @@ dboard_manager_impl::dboard_manager_impl(
set_nice_dboard_if();
//dboard constructor args
- dboard_base::ctor_args_impl db_ctor_args;
+ dboard_ctor_args_t db_ctor_args;
db_ctor_args.db_iface = iface;
//make xcvr subdevs (make one subdev for both rx and tx dboards)