From 1fe98e8701dd0b790b172762c3629db32956d1fc Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 28 Sep 2019 11:18:57 +0200 Subject: uhd: Replace usage of boost smart pointers with C++11 counterparts This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include . Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct. --- host/include/uhd/convert.hpp | 4 ++-- host/include/uhd/device.hpp | 4 ++-- host/include/uhd/property_tree.hpp | 16 ++++++++-------- host/include/uhd/property_tree.ipp | 18 +++++++++--------- host/include/uhd/rfnoc/block_id.hpp | 2 +- host/include/uhd/rfnoc/blockdef.hpp | 6 +++--- host/include/uhd/stream.hpp | 6 +++--- host/include/uhd/transport/buffer_pool.hpp | 4 ++-- host/include/uhd/transport/muxed_zero_copy_if.hpp | 2 +- host/include/uhd/transport/nirio/nifpga_lvbitx.h | 3 +-- host/include/uhd/transport/nirio/nirio_fifo.h | 3 +-- .../uhd/transport/nirio/nirio_resource_manager.h | 4 ++-- host/include/uhd/transport/nirio/niriok_proxy.h | 11 +++++------ .../include/uhd/transport/nirio/niriok_proxy_impl_v1.h | 1 - .../include/uhd/transport/nirio/niriok_proxy_impl_v2.h | 1 - host/include/uhd/transport/nirio/niusrprio_session.h | 11 +++++------ host/include/uhd/transport/nirio/rpc/rpc_client.hpp | 4 ++-- host/include/uhd/transport/nirio/rpc/rpc_common.hpp | 5 +++-- host/include/uhd/transport/nirio_zero_copy.hpp | 4 ++-- host/include/uhd/transport/tcp_zero_copy.hpp | 2 +- host/include/uhd/transport/udp_simple.hpp | 4 ++-- host/include/uhd/transport/udp_zero_copy.hpp | 4 ++-- host/include/uhd/transport/usb_control.hpp | 4 ++-- host/include/uhd/transport/usb_device_handle.hpp | 4 ++-- host/include/uhd/transport/usb_zero_copy.hpp | 2 +- host/include/uhd/transport/zero_copy.hpp | 4 ++-- host/include/uhd/transport/zero_copy_flow_ctrl.hpp | 4 ++-- host/include/uhd/types/filters.hpp | 12 ++++++------ host/include/uhd/types/serial.hpp | 8 ++++---- host/include/uhd/types/wb_iface.hpp | 6 +++--- host/include/uhd/usrp/dboard_base.hpp | 4 ++-- host/include/uhd/usrp/dboard_iface.hpp | 4 ++-- host/include/uhd/usrp/dboard_manager.hpp | 4 ++-- host/include/uhd/usrp/gps_ctrl.hpp | 4 ++-- host/include/uhd/usrp/multi_usrp.hpp | 4 ++-- host/include/uhd/usrp_clock/multi_usrp_clock.hpp | 2 +- host/include/uhd/utils/gain_group.hpp | 4 ++-- host/include/uhd/utils/msg_task.hpp | 4 ++-- host/include/uhd/utils/pimpl.hpp | 6 +++--- host/include/uhd/utils/soft_register.hpp | 10 +++++----- host/include/uhd/utils/tasks.hpp | 9 +++++---- 41 files changed, 107 insertions(+), 111 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/convert.hpp b/host/include/uhd/convert.hpp index 3af7cc47b..4d84fcdaa 100644 --- a/host/include/uhd/convert.hpp +++ b/host/include/uhd/convert.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include namespace uhd { namespace convert { @@ -21,7 +21,7 @@ namespace uhd { namespace convert { class converter { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef uhd::ref_vector output_type; typedef uhd::ref_vector input_type; diff --git a/host/include/uhd/device.hpp b/host/include/uhd/device.hpp index 44f74b210..11bedf216 100644 --- a/host/include/uhd/device.hpp +++ b/host/include/uhd/device.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include namespace uhd { @@ -27,7 +27,7 @@ class property_tree; // forward declaration class UHD_API device : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef boost::function find_t; typedef boost::function make_t; diff --git a/host/include/uhd/property_tree.hpp b/host/include/uhd/property_tree.hpp index d97a5505e..4a839f8e9 100644 --- a/host/include/uhd/property_tree.hpp +++ b/host/include/uhd/property_tree.hpp @@ -12,10 +12,10 @@ #include #include #include -#include -#include +#include #include #include +#include namespace uhd { @@ -215,7 +215,7 @@ UHD_API fs_path operator/(const fs_path&, size_t); class UHD_API property_tree : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; enum coerce_mode_t { AUTO_COERCE, MANUAL_COERCE }; @@ -246,21 +246,21 @@ public: //! Pop a property off the tree, and returns the property template - boost::shared_ptr > pop(const fs_path& path); + std::shared_ptr > pop(const fs_path& path); private: //! Internal pop function - virtual boost::shared_ptr _pop(const fs_path& path) = 0; + virtual std::shared_ptr _pop(const fs_path& path) = 0; //! Internal create property with wild-card type - virtual void _create(const fs_path& path, const boost::shared_ptr& prop, + virtual void _create(const fs_path& path, const std::shared_ptr& prop, std::type_index prop_type) = 0; //! Internal access property with wild-card type - virtual boost::shared_ptr& _access(const fs_path& path) const = 0; + virtual std::shared_ptr& _access(const fs_path& path) const = 0; //! Internal access property with wild-card type but with type verification - virtual boost::shared_ptr& _access_with_type_check( + virtual std::shared_ptr& _access_with_type_check( const fs_path& path, std::type_index expected_prop_type) const = 0; }; diff --git a/host/include/uhd/property_tree.ipp b/host/include/uhd/property_tree.ipp index 20ad43fb1..3bae2a451 100644 --- a/host/include/uhd/property_tree.ipp +++ b/host/include/uhd/property_tree.ipp @@ -11,9 +11,9 @@ #include #include -#include #include #include +#include /*********************************************************************** * Implement templated property impl @@ -147,7 +147,7 @@ private: return value; } - static void init_or_set_value(boost::scoped_ptr& scoped_value, const T& init_val) + static void init_or_set_value(std::unique_ptr& scoped_value, const T& init_val) { if (scoped_value.get() == NULL) { scoped_value.reset(new T(init_val)); @@ -156,7 +156,7 @@ private: } } - static const T& get_value_ref(const boost::scoped_ptr& scoped_value) + static const T& get_value_ref(const std::unique_ptr& scoped_value) { if (scoped_value.get() == NULL) throw uhd::assertion_error("Cannot use uninitialized property data"); @@ -168,8 +168,8 @@ private: std::vector::subscriber_type> _coerced_subscribers; typename property::publisher_type _publisher; typename property::coercer_type _coercer; - boost::scoped_ptr _value; - boost::scoped_ptr _coerced_value; + std::unique_ptr _value; + std::unique_ptr _coerced_value; }; }} // namespace uhd:: @@ -183,7 +183,7 @@ template property& property_tree::create(const fs_path& path, coerce_mode_t coerce_mode) { this->_create(path, - typename boost::shared_ptr >(new property_impl(coerce_mode)), + typename std::shared_ptr >(new property_impl(coerce_mode)), std::type_index(typeid(T))); return this->access(path); } @@ -191,14 +191,14 @@ property& property_tree::create(const fs_path& path, coerce_mode_t coerce_mod template property& property_tree::access(const fs_path& path) { - return *boost::static_pointer_cast >( + return *std::static_pointer_cast >( this->_access_with_type_check(path, std::type_index(typeid(T)))); } template -typename boost::shared_ptr > property_tree::pop(const fs_path& path) +typename std::shared_ptr > property_tree::pop(const fs_path& path) { - return boost::static_pointer_cast >(this->_pop(path)); + return std::static_pointer_cast >(this->_pop(path)); } } // namespace uhd diff --git a/host/include/uhd/rfnoc/block_id.hpp b/host/include/uhd/rfnoc/block_id.hpp index 106fb394f..d15220aa7 100644 --- a/host/include/uhd/rfnoc/block_id.hpp +++ b/host/include/uhd/rfnoc/block_id.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/host/include/uhd/rfnoc/blockdef.hpp b/host/include/uhd/rfnoc/blockdef.hpp index e35c8e234..d6bcec414 100644 --- a/host/include/uhd/rfnoc/blockdef.hpp +++ b/host/include/uhd/rfnoc/blockdef.hpp @@ -11,18 +11,18 @@ #include #include #include -#include #include #include +#include namespace uhd { namespace rfnoc { /*! Reads and stores block definitions for blocks and components. */ -class UHD_API blockdef : public boost::enable_shared_from_this +class UHD_API blockdef : public std::enable_shared_from_this { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; //! Describes port options for a block definition. // diff --git a/host/include/uhd/stream.hpp b/host/include/uhd/stream.hpp index 7abab5b3c..5cbb652d6 100644 --- a/host/include/uhd/stream.hpp +++ b/host/include/uhd/stream.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -170,7 +170,7 @@ struct UHD_API stream_args_t class UHD_API rx_streamer : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~rx_streamer(void); @@ -248,7 +248,7 @@ public: class UHD_API tx_streamer : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~tx_streamer(void); diff --git a/host/include/uhd/transport/buffer_pool.hpp b/host/include/uhd/transport/buffer_pool.hpp index 53949cbaf..125d5b8e3 100644 --- a/host/include/uhd/transport/buffer_pool.hpp +++ b/host/include/uhd/transport/buffer_pool.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace uhd { namespace transport { @@ -21,7 +21,7 @@ namespace uhd { namespace transport { class UHD_API buffer_pool : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef void* ptr_type; virtual ~buffer_pool(void) = 0; diff --git a/host/include/uhd/transport/muxed_zero_copy_if.hpp b/host/include/uhd/transport/muxed_zero_copy_if.hpp index d8230aaf9..61086fbba 100644 --- a/host/include/uhd/transport/muxed_zero_copy_if.hpp +++ b/host/include/uhd/transport/muxed_zero_copy_if.hpp @@ -28,7 +28,7 @@ namespace uhd { namespace transport { class muxed_zero_copy_if : private uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Function to classify the stream based on the payload. diff --git a/host/include/uhd/transport/nirio/nifpga_lvbitx.h b/host/include/uhd/transport/nirio/nifpga_lvbitx.h index 1b27b67e0..a66e8fcc3 100644 --- a/host/include/uhd/transport/nirio/nifpga_lvbitx.h +++ b/host/include/uhd/transport/nirio/nifpga_lvbitx.h @@ -10,13 +10,12 @@ #include #include -#include namespace uhd { namespace niusrprio { class UHD_API nifpga_lvbitx { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~nifpga_lvbitx() {}; diff --git a/host/include/uhd/transport/nirio/nirio_fifo.h b/host/include/uhd/transport/nirio/nirio_fifo.h index 317ca777d..405e6c41d 100644 --- a/host/include/uhd/transport/nirio/nirio_fifo.h +++ b/host/include/uhd/transport/nirio/nirio_fifo.h @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +33,7 @@ template class nirio_fifo : private uhd::noncopyable { public: - typedef boost::shared_ptr< nirio_fifo > sptr; + typedef std::shared_ptr< nirio_fifo > sptr; typedef enum { MINIMIZE_LATENCY, diff --git a/host/include/uhd/transport/nirio/nirio_resource_manager.h b/host/include/uhd/transport/nirio/nirio_resource_manager.h index de9c5f3fc..e1562419f 100644 --- a/host/include/uhd/transport/nirio/nirio_resource_manager.h +++ b/host/include/uhd/transport/nirio/nirio_resource_manager.h @@ -58,7 +58,7 @@ public: nirio_status get_register_offset(const char* register_name, uint32_t& offset); template - nirio_status create_tx_fifo(const char* fifo_name, boost::shared_ptr< nirio_fifo >& fifo) + nirio_status create_tx_fifo(const char* fifo_name, std::shared_ptr< nirio_fifo >& fifo) { nirio_fifo_info_t* fifo_info_ptr = _lookup_fifo_info(fifo_name); if (fifo_info_ptr) { @@ -74,7 +74,7 @@ public: } template - nirio_status create_rx_fifo(const char* fifo_name, boost::shared_ptr< nirio_fifo >& fifo) + nirio_status create_rx_fifo(const char* fifo_name, std::shared_ptr< nirio_fifo >& fifo) { nirio_fifo_info_t* fifo_info_ptr = _lookup_fifo_info(fifo_name); if (fifo_info_ptr) { diff --git a/host/include/uhd/transport/nirio/niriok_proxy.h b/host/include/uhd/transport/nirio/niriok_proxy.h index 8bd877e30..13cf172fa 100644 --- a/host/include/uhd/transport/nirio/niriok_proxy.h +++ b/host/include/uhd/transport/nirio/niriok_proxy.h @@ -8,13 +8,12 @@ #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_INTERFACE_H #define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_INTERFACE_H -#include -#include -#include -#include -#include #include #include +#include +#include +#include +#include #define NI_VENDOR_NUM 0x1093 @@ -135,7 +134,7 @@ namespace uhd { namespace niusrprio class UHD_API niriok_proxy : public uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static sptr make_and_open(const std::string& interface_path); diff --git a/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h b/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h index edeadc34d..b659cffab 100644 --- a/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h +++ b/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h @@ -8,7 +8,6 @@ #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V1_H #define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V1_H -#include #include #include #include diff --git a/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h b/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h index 31013fbfc..0f49749de 100644 --- a/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h +++ b/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h @@ -8,7 +8,6 @@ #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V2_H #define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V2_H -#include #include #include #include diff --git a/host/include/uhd/transport/nirio/niusrprio_session.h b/host/include/uhd/transport/nirio/niusrprio_session.h index 2154c41f1..2fff0ac36 100644 --- a/host/include/uhd/transport/nirio/niusrprio_session.h +++ b/host/include/uhd/transport/nirio/niusrprio_session.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -24,7 +23,7 @@ namespace uhd { namespace niusrprio { class UHD_API niusrprio_session : private uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef uhd::usrprio_rpc::usrprio_device_info device_info; typedef uhd::usrprio_rpc::usrprio_device_info_vtr device_info_vtr; @@ -42,7 +41,7 @@ public: template nirio_status create_tx_fifo( - const char* fifo_name, boost::shared_ptr>& fifo) + const char* fifo_name, std::shared_ptr>& fifo) { if (!_session_open) return NiRio_Status_ResourceNotInitialized; @@ -51,7 +50,7 @@ public: template nirio_status create_tx_fifo( - uint32_t fifo_instance, boost::shared_ptr>& fifo) + uint32_t fifo_instance, std::shared_ptr>& fifo) { if ((size_t)fifo_instance >= _lvbitx->get_output_fifo_count()) return NiRio_Status_InvalidParameter; @@ -60,7 +59,7 @@ public: template nirio_status create_rx_fifo( - const char* fifo_name, boost::shared_ptr>& fifo) + const char* fifo_name, std::shared_ptr>& fifo) { if (!_session_open) return NiRio_Status_ResourceNotInitialized; @@ -69,7 +68,7 @@ public: template nirio_status create_rx_fifo( - uint32_t fifo_instance, boost::shared_ptr>& fifo) + uint32_t fifo_instance, std::shared_ptr>& fifo) { if ((size_t)fifo_instance >= _lvbitx->get_input_fifo_count()) return NiRio_Status_InvalidParameter; diff --git a/host/include/uhd/transport/nirio/rpc/rpc_client.hpp b/host/include/uhd/transport/nirio/rpc/rpc_client.hpp index 80ba20320..04f560e6a 100644 --- a/host/include/uhd/transport/nirio/rpc/rpc_client.hpp +++ b/host/include/uhd/transport/nirio/rpc/rpc_client.hpp @@ -12,9 +12,9 @@ #include #include #include -#include #include #include +#include namespace uhd { namespace usrprio_rpc { @@ -68,7 +68,7 @@ private: // Services boost::asio::io_service _io_service; - boost::scoped_ptr _io_service_thread; + std::unique_ptr _io_service_thread; boost::asio::ip::tcp::socket _socket; // Handshake info hshake_args_t _hshake_args_client; diff --git a/host/include/uhd/transport/nirio/rpc/rpc_common.hpp b/host/include/uhd/transport/nirio/rpc/rpc_common.hpp index 2384c0f61..9be1d024c 100644 --- a/host/include/uhd/transport/nirio/rpc/rpc_common.hpp +++ b/host/include/uhd/transport/nirio/rpc/rpc_common.hpp @@ -22,6 +22,7 @@ # include #endif #include +#include namespace uhd { namespace usrprio_rpc { @@ -131,9 +132,9 @@ public: private: std::istringstream _stream; #if (USE_BINARY_ARCHIVE) - boost::scoped_ptr _archive; + std::unique_ptr _archive; #else - boost::scoped_ptr _archive; + std::unique_ptr _archive; #endif }; diff --git a/host/include/uhd/transport/nirio_zero_copy.hpp b/host/include/uhd/transport/nirio_zero_copy.hpp index b5e4dea38..096f592a8 100644 --- a/host/include/uhd/transport/nirio_zero_copy.hpp +++ b/host/include/uhd/transport/nirio_zero_copy.hpp @@ -13,14 +13,14 @@ #include #include #include -#include +#include namespace uhd { namespace transport { class UHD_API nirio_zero_copy : public virtual zero_copy_if { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static sptr make(uhd::niusrprio::niusrprio_session::sptr fpga_session, const uint32_t instance, diff --git a/host/include/uhd/transport/tcp_zero_copy.hpp b/host/include/uhd/transport/tcp_zero_copy.hpp index 4db68cec8..b1d052513 100644 --- a/host/include/uhd/transport/tcp_zero_copy.hpp +++ b/host/include/uhd/transport/tcp_zero_copy.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace uhd { namespace transport { diff --git a/host/include/uhd/transport/udp_simple.hpp b/host/include/uhd/transport/udp_simple.hpp index a936cb204..52395d544 100644 --- a/host/include/uhd/transport/udp_simple.hpp +++ b/host/include/uhd/transport/udp_simple.hpp @@ -12,14 +12,14 @@ #include #include #include -#include +#include namespace uhd { namespace transport { class UHD_API udp_simple : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~udp_simple(void) = 0; diff --git a/host/include/uhd/transport/udp_zero_copy.hpp b/host/include/uhd/transport/udp_zero_copy.hpp index 2fedad99a..3fb3fc396 100644 --- a/host/include/uhd/transport/udp_zero_copy.hpp +++ b/host/include/uhd/transport/udp_zero_copy.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace uhd { namespace transport { @@ -34,7 +34,7 @@ public: size_t send_buff_size; }; - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Make a new zero copy udp transport: diff --git a/host/include/uhd/transport/usb_control.hpp b/host/include/uhd/transport/usb_control.hpp index fb37dc9fe..a6ad1e1c9 100644 --- a/host/include/uhd/transport/usb_control.hpp +++ b/host/include/uhd/transport/usb_control.hpp @@ -10,14 +10,14 @@ #include #include -#include +#include namespace uhd { namespace transport { class UHD_API usb_control : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~usb_control(void); diff --git a/host/include/uhd/transport/usb_device_handle.hpp b/host/include/uhd/transport/usb_device_handle.hpp index a4eeae510..b0dea1b77 100644 --- a/host/include/uhd/transport/usb_device_handle.hpp +++ b/host/include/uhd/transport/usb_device_handle.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -32,7 +32,7 @@ namespace uhd { namespace transport { class UHD_API usb_device_handle : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef std::pair vid_pid_pair_t; virtual ~usb_device_handle(void); diff --git a/host/include/uhd/transport/usb_zero_copy.hpp b/host/include/uhd/transport/usb_zero_copy.hpp index d78807768..ecb3ff148 100644 --- a/host/include/uhd/transport/usb_zero_copy.hpp +++ b/host/include/uhd/transport/usb_zero_copy.hpp @@ -27,7 +27,7 @@ namespace uhd { namespace transport { class UHD_API usb_zero_copy : public virtual zero_copy_if { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~usb_zero_copy(void); diff --git a/host/include/uhd/transport/zero_copy.hpp b/host/include/uhd/transport/zero_copy.hpp index c59213e92..a28398445 100644 --- a/host/include/uhd/transport/zero_copy.hpp +++ b/host/include/uhd/transport/zero_copy.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include namespace uhd { namespace transport { @@ -148,7 +148,7 @@ struct zero_copy_xport_params class UHD_API zero_copy_if : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Clean up tasks before releasing the transport object. diff --git a/host/include/uhd/transport/zero_copy_flow_ctrl.hpp b/host/include/uhd/transport/zero_copy_flow_ctrl.hpp index f98a0891c..f12aed2a9 100644 --- a/host/include/uhd/transport/zero_copy_flow_ctrl.hpp +++ b/host/include/uhd/transport/zero_copy_flow_ctrl.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace uhd { namespace transport { @@ -28,7 +28,7 @@ typedef boost::function flow_ctrl_func; class UHD_API zero_copy_flow_ctrl : public virtual zero_copy_if { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Make flow controlled transport. diff --git a/host/include/uhd/types/filters.hpp b/host/include/uhd/types/filters.hpp index ff72dd5e3..d15002c0e 100644 --- a/host/include/uhd/types/filters.hpp +++ b/host/include/uhd/types/filters.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -24,7 +24,7 @@ namespace uhd { class UHD_API filter_info_base { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; enum filter_type { ANALOG_LOW_PASS, ANALOG_BAND_PASS, DIGITAL_I16, DIGITAL_FIR_I16 }; filter_info_base(filter_type type, bool bypass, size_t position_index) @@ -63,7 +63,7 @@ class UHD_API analog_filter_base : public filter_info_base std::string _analog_type; public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; analog_filter_base(filter_type type, bool bypass, size_t position_index, @@ -87,7 +87,7 @@ class UHD_API analog_filter_lp : public analog_filter_base double _rolloff; public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; analog_filter_lp(filter_type type, bool bypass, size_t position_index, @@ -130,7 +130,7 @@ protected: std::vector _taps; public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; digital_filter_base(filter_type type, bool bypass, size_t position_index, @@ -208,7 +208,7 @@ template class UHD_API digital_filter_fir : public digital_filter_base { public: - typedef boost::shared_ptr > sptr; + typedef std::shared_ptr > sptr; digital_filter_fir(filter_info_base::filter_type type, bool bypass, diff --git a/host/include/uhd/types/serial.hpp b/host/include/uhd/types/serial.hpp index 82d2f6070..a34baf5eb 100644 --- a/host/include/uhd/types/serial.hpp +++ b/host/include/uhd/types/serial.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include @@ -36,7 +36,7 @@ typedef std::vector byte_vector_t; class UHD_API i2c_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~i2c_iface(void); @@ -115,7 +115,7 @@ struct UHD_API spi_config_t class UHD_API spi_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~spi_iface(void); @@ -162,7 +162,7 @@ public: class UHD_API uart_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~uart_iface(void); diff --git a/host/include/uhd/types/wb_iface.hpp b/host/include/uhd/types/wb_iface.hpp index 495762118..2b7a6d4c5 100644 --- a/host/include/uhd/types/wb_iface.hpp +++ b/host/include/uhd/types/wb_iface.hpp @@ -11,14 +11,14 @@ #include #include #include -#include +#include namespace uhd { class UHD_API wb_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef uint32_t wb_addr_type; virtual ~wb_iface(void); @@ -69,7 +69,7 @@ public: class UHD_API timed_wb_iface : public wb_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Get the command time. diff --git a/host/include/uhd/usrp/dboard_base.hpp b/host/include/uhd/usrp/dboard_base.hpp index 25f5b816d..9575e6bc9 100644 --- a/host/include/uhd/usrp/dboard_base.hpp +++ b/host/include/uhd/usrp/dboard_base.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include namespace uhd { namespace usrp { @@ -25,7 +25,7 @@ namespace uhd { namespace usrp { class UHD_API dboard_base : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * An opaque type for the dboard constructor args. * Derived classes should pass the args into the base class, diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp index 162d0c6a3..9a25fb607 100644 --- a/host/include/uhd/usrp/dboard_iface.hpp +++ b/host/include/uhd/usrp/dboard_iface.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -53,7 +53,7 @@ struct UHD_API dboard_iface_special_props_t class UHD_API dboard_iface : public uhd::i2c_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef dboard_iface_special_props_t special_props_t; //! tells the host which unit to use diff --git a/host/include/uhd/usrp/dboard_manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp index eb255c346..737c24add 100644 --- a/host/include/uhd/usrp/dboard_manager.hpp +++ b/host/include/uhd/usrp/dboard_manager.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -27,7 +27,7 @@ namespace uhd { namespace usrp { class UHD_API dboard_manager : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; // dboard constructor (each dboard should have a ::make with this signature) typedef dboard_base::sptr (*dboard_ctor_t)(dboard_base::ctor_args_t); diff --git a/host/include/uhd/usrp/gps_ctrl.hpp b/host/include/uhd/usrp/gps_ctrl.hpp index a3485226c..7743894c1 100644 --- a/host/include/uhd/usrp/gps_ctrl.hpp +++ b/host/include/uhd/usrp/gps_ctrl.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include namespace uhd { @@ -19,7 +19,7 @@ namespace uhd { class UHD_API gps_ctrl : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~gps_ctrl(void) = 0; diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 99a966b7a..27b5f3d9a 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -95,7 +95,7 @@ namespace usrp { class UHD_API multi_usrp : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~multi_usrp(void) = 0; diff --git a/host/include/uhd/usrp_clock/multi_usrp_clock.hpp b/host/include/uhd/usrp_clock/multi_usrp_clock.hpp index 48f8a5eae..6faa10714 100644 --- a/host/include/uhd/usrp_clock/multi_usrp_clock.hpp +++ b/host/include/uhd/usrp_clock/multi_usrp_clock.hpp @@ -45,7 +45,7 @@ namespace uhd { namespace usrp_clock { class UHD_API multi_usrp_clock : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~multi_usrp_clock(void) = 0; diff --git a/host/include/uhd/utils/gain_group.hpp b/host/include/uhd/utils/gain_group.hpp index 69cd9dc6b..8fe69441f 100644 --- a/host/include/uhd/utils/gain_group.hpp +++ b/host/include/uhd/utils/gain_group.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -31,7 +31,7 @@ struct UHD_API gain_fcns_t class UHD_API gain_group : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~gain_group(void) = 0; diff --git a/host/include/uhd/utils/msg_task.hpp b/host/include/uhd/utils/msg_task.hpp index 4e73b7720..fd08523f7 100644 --- a/host/include/uhd/utils/msg_task.hpp +++ b/host/include/uhd/utils/msg_task.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -21,7 +21,7 @@ namespace uhd { class UHD_API msg_task : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef std::vector msg_payload_t; typedef std::pair msg_type_t; typedef boost::function(void)> task_fcn_type; diff --git a/host/include/uhd/utils/pimpl.hpp b/host/include/uhd/utils/pimpl.hpp index a19f4ddc2..b0fbf7fec 100644 --- a/host/include/uhd/utils/pimpl.hpp +++ b/host/include/uhd/utils/pimpl.hpp @@ -9,7 +9,7 @@ #define INCLUDED_UHD_UTILS_PIMPL_HPP #include -#include +#include /*! \file pimpl.hpp * "Pimpl idiom" (pointer to implementation idiom). @@ -31,7 +31,7 @@ */ #define UHD_PIMPL_DECL(_name) \ struct _name; \ - boost::shared_ptr<_name> + std::shared_ptr<_name> /*! * Make an instance of a pimpl in a source file. @@ -40,6 +40,6 @@ * \param _name the name of the pimpl class * \param _args the constructor args for the pimpl */ -#define UHD_PIMPL_MAKE(_name, _args) boost::shared_ptr<_name>(new _name _args) +#define UHD_PIMPL_MAKE(_name, _args) std::shared_ptr<_name>(new _name _args) #endif /* INCLUDED_UHD_UTILS_PIMPL_HPP */ diff --git a/host/include/uhd/utils/soft_register.hpp b/host/include/uhd/utils/soft_register.hpp index b6897551f..ba716b206 100644 --- a/host/include/uhd/utils/soft_register.hpp +++ b/host/include/uhd/utils/soft_register.hpp @@ -138,7 +138,7 @@ template class UHD_API soft_register_t : public soft_register_base { public: - typedef boost::shared_ptr > sptr; + typedef std::shared_ptr > sptr; // Reserved field. Represents all bits in the register. UHD_DEFINE_SOFT_REG_FIELD(REGISTER, sizeof(reg_data_t) * 8, 0); //[WIDTH-1:0] @@ -312,7 +312,7 @@ class UHD_API soft_register_sync_t : public soft_register_t { public: - typedef boost::shared_ptr > sptr; + typedef std::shared_ptr > sptr; soft_register_sync_t(wb_iface::wb_addr_type wr_addr, wb_iface::wb_addr_type rd_addr, @@ -428,7 +428,7 @@ typedef soft_register_sync_t soft_reg64_rw_sync_t; reg_obj.initialize(iface); reg_obj.write(example_reg_t::FIELD2, 0x1234); - example_reg_t::sptr reg_sptr = boost::make_shared(); + example_reg_t::sptr reg_sptr = std::make_shared(); reg_obj->initialize(iface); reg_obj->write(example_reg_t::FIELD2, 0x1234); } @@ -444,7 +444,7 @@ namespace uhd { class UHD_API soft_regmap_accessor_t { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~soft_regmap_accessor_t(){}; virtual soft_register_base& lookup(const std::string& path) const = 0; @@ -587,7 +587,7 @@ private: class UHD_API soft_regmap_db_t : public soft_regmap_accessor_t, public uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Use the default constructor if this is the top-level DB diff --git a/host/include/uhd/utils/tasks.hpp b/host/include/uhd/utils/tasks.hpp index fdb3869ee..eaee3edbe 100644 --- a/host/include/uhd/utils/tasks.hpp +++ b/host/include/uhd/utils/tasks.hpp @@ -1,7 +1,8 @@ // // Copyright 2011-2012 Ettus Research LLC -// Copyright 2018 Ettus Research, a National Instruments Company // Copyright 2017 Ettus Research (National Instruments Corp.) +// Copyright 2018 Ettus Research, a National Instruments Company +// Copyright 2019 Ettus Research, a National Instruments Brand // // SPDX-License-Identifier: GPL-3.0-or-later // @@ -12,15 +13,15 @@ #include #include #include -#include -#include +#include +#include namespace uhd { class UHD_API task : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef boost::function task_fcn_type; /*! -- cgit v1.2.3