diff options
Diffstat (limited to 'host/include')
41 files changed, 107 insertions, 111 deletions
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 <uhd/types/ref_vector.hpp> #include <boost/function.hpp> #include <boost/operators.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <string> namespace uhd { namespace convert { @@ -21,7 +21,7 @@ namespace uhd { namespace convert { class converter { public: - typedef boost::shared_ptr<converter> sptr; + typedef std::shared_ptr<converter> sptr; typedef uhd::ref_vector<void*> output_type; typedef uhd::ref_vector<const void*> 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 <uhd/types/device_addr.hpp> #include <uhd/utils/noncopyable.hpp> #include <boost/function.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace uhd { @@ -27,7 +27,7 @@ class property_tree; // forward declaration class UHD_API device : uhd::noncopyable { public: - typedef boost::shared_ptr<device> sptr; + typedef std::shared_ptr<device> sptr; typedef boost::function<device_addrs_t(const device_addr_t&)> find_t; typedef boost::function<sptr(const device_addr_t&)> 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 <uhd/config.hpp> #include <uhd/utils/noncopyable.hpp> #include <boost/function.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/utility.hpp> +#include <memory> #include <typeindex> #include <vector> +#include <string> 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<property_tree> sptr; + typedef std::shared_ptr<property_tree> 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 <typename T> - boost::shared_ptr<property<T> > pop(const fs_path& path); + std::shared_ptr<property<T> > pop(const fs_path& path); private: //! Internal pop function - virtual boost::shared_ptr<void> _pop(const fs_path& path) = 0; + virtual std::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, + virtual void _create(const fs_path& path, const std::shared_ptr<void>& prop, std::type_index prop_type) = 0; //! Internal access property with wild-card type - virtual boost::shared_ptr<void>& _access(const fs_path& path) const = 0; + virtual std::shared_ptr<void>& _access(const fs_path& path) const = 0; //! Internal access property with wild-card type but with type verification - virtual boost::shared_ptr<void>& _access_with_type_check( + virtual std::shared_ptr<void>& _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 <uhd/exception.hpp> #include <boost/foreach.hpp> -#include <boost/scoped_ptr.hpp> #include <typeindex> #include <vector> +#include <memory> /*********************************************************************** * Implement templated property impl @@ -147,7 +147,7 @@ private: return value; } - static void init_or_set_value(boost::scoped_ptr<T>& scoped_value, const T& init_val) + static void init_or_set_value(std::unique_ptr<T>& 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<T>& scoped_value) + static const T& get_value_ref(const std::unique_ptr<T>& scoped_value) { if (scoped_value.get() == NULL) throw uhd::assertion_error("Cannot use uninitialized property data"); @@ -168,8 +168,8 @@ private: std::vector<typename property<T>::subscriber_type> _coerced_subscribers; typename property<T>::publisher_type _publisher; typename property<T>::coercer_type _coercer; - boost::scoped_ptr<T> _value; - boost::scoped_ptr<T> _coerced_value; + std::unique_ptr<T> _value; + std::unique_ptr<T> _coerced_value; }; }} // namespace uhd:: @@ -183,7 +183,7 @@ template <typename T> property<T>& property_tree::create(const fs_path& path, coerce_mode_t coerce_mode) { this->_create(path, - typename boost::shared_ptr<property<T> >(new property_impl<T>(coerce_mode)), + typename std::shared_ptr<property<T> >(new property_impl<T>(coerce_mode)), std::type_index(typeid(T))); return this->access<T>(path); } @@ -191,14 +191,14 @@ property<T>& property_tree::create(const fs_path& path, coerce_mode_t coerce_mod template <typename T> property<T>& property_tree::access(const fs_path& path) { - return *boost::static_pointer_cast<property<T> >( + return *std::static_pointer_cast<property<T> >( this->_access_with_type_check(path, std::type_index(typeid(T)))); } template <typename T> -typename boost::shared_ptr<property<T> > property_tree::pop(const fs_path& path) +typename std::shared_ptr<property<T> > property_tree::pop(const fs_path& path) { - return boost::static_pointer_cast<property<T> >(this->_pop(path)); + return std::static_pointer_cast<property<T> >(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 <uhd/config.hpp> #include <stdint.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <iostream> #include <string> 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 <uhd/config.hpp> #include <uhd/types/device_addr.hpp> #include <stdint.h> -#include <boost/enable_shared_from_this.hpp> #include <set> #include <vector> +#include <memory> namespace uhd { namespace rfnoc { /*! Reads and stores block definitions for blocks and components. */ -class UHD_API blockdef : public boost::enable_shared_from_this<blockdef> +class UHD_API blockdef : public std::enable_shared_from_this<blockdef> { public: - typedef boost::shared_ptr<blockdef> sptr; + typedef std::shared_ptr<blockdef> 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 <uhd/types/ref_vector.hpp> #include <uhd/types/stream_cmd.hpp> #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/utility.hpp> #include <string> #include <vector> @@ -170,7 +170,7 @@ struct UHD_API stream_args_t class UHD_API rx_streamer : uhd::noncopyable { public: - typedef boost::shared_ptr<rx_streamer> sptr; + typedef std::shared_ptr<rx_streamer> sptr; virtual ~rx_streamer(void); @@ -248,7 +248,7 @@ public: class UHD_API tx_streamer : uhd::noncopyable { public: - typedef boost::shared_ptr<tx_streamer> sptr; + typedef std::shared_ptr<tx_streamer> 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 <uhd/config.hpp> #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace uhd { namespace transport { @@ -21,7 +21,7 @@ namespace uhd { namespace transport { class UHD_API buffer_pool : uhd::noncopyable { public: - typedef boost::shared_ptr<buffer_pool> sptr; + typedef std::shared_ptr<buffer_pool> 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<muxed_zero_copy_if> sptr; + typedef std::shared_ptr<muxed_zero_copy_if> 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 <uhd/transport/nirio/nirio_resource_manager.h> #include <uhd/transport/nirio/niriok_proxy.h> -#include <boost/smart_ptr.hpp> namespace uhd { namespace niusrprio { class UHD_API nifpga_lvbitx { public: - typedef boost::shared_ptr<nifpga_lvbitx> sptr; + typedef std::shared_ptr<nifpga_lvbitx> 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 <uhd/transport/nirio/niriok_proxy.h> #include <uhd/transport/nirio/status.h> #include <uhd/utils/noncopyable.hpp> -#include <boost/smart_ptr.hpp> #include <boost/thread/recursive_mutex.hpp> #include <atomic> #include <string> @@ -34,7 +33,7 @@ template <typename data_t> class nirio_fifo : private uhd::noncopyable { public: - typedef boost::shared_ptr< nirio_fifo<data_t> > sptr; + typedef std::shared_ptr< nirio_fifo<data_t> > 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<typename data_t> - nirio_status create_tx_fifo(const char* fifo_name, boost::shared_ptr< nirio_fifo<data_t> >& fifo) + nirio_status create_tx_fifo(const char* fifo_name, std::shared_ptr< nirio_fifo<data_t> >& fifo) { nirio_fifo_info_t* fifo_info_ptr = _lookup_fifo_info(fifo_name); if (fifo_info_ptr) { @@ -74,7 +74,7 @@ public: } template<typename data_t> - nirio_status create_rx_fifo(const char* fifo_name, boost::shared_ptr< nirio_fifo<data_t> >& fifo) + nirio_status create_rx_fifo(const char* fifo_name, std::shared_ptr< nirio_fifo<data_t> >& 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 <stdint.h> -#include <boost/smart_ptr.hpp> -#include <uhd/utils/noncopyable.hpp> -#include <boost/thread/shared_mutex.hpp> -#include <boost/thread/locks.hpp> #include <uhd/transport/nirio/nirio_driver_iface.h> #include <uhd/transport/nirio/nirio_quirks.h> +#include <uhd/utils/noncopyable.hpp> +#include <stdint.h> +#include <boost/thread/locks.hpp> +#include <boost/thread/shared_mutex.hpp> #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<niriok_proxy> sptr; + typedef std::shared_ptr<niriok_proxy> 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 <boost/smart_ptr.hpp> #include <uhd/utils/noncopyable.hpp> #include <uhd/transport/nirio/nirio_driver_iface.h> #include <uhd/transport/nirio/nirio_quirks.h> 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 <boost/smart_ptr.hpp> #include <uhd/utils/noncopyable.hpp> #include <uhd/transport/nirio/nirio_driver_iface.h> #include <uhd/transport/nirio/nirio_quirks.h> 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 <uhd/transport/nirio/rpc/usrprio_rpc_client.hpp> #include <uhd/utils/noncopyable.hpp> #include <stdint.h> -#include <boost/smart_ptr.hpp> #include <boost/thread/recursive_mutex.hpp> #include <string> @@ -24,7 +23,7 @@ namespace uhd { namespace niusrprio { class UHD_API niusrprio_session : private uhd::noncopyable { public: - typedef boost::shared_ptr<niusrprio_session> sptr; + typedef std::shared_ptr<niusrprio_session> 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 <typename data_t> nirio_status create_tx_fifo( - const char* fifo_name, boost::shared_ptr<nirio_fifo<data_t>>& fifo) + const char* fifo_name, std::shared_ptr<nirio_fifo<data_t>>& fifo) { if (!_session_open) return NiRio_Status_ResourceNotInitialized; @@ -51,7 +50,7 @@ public: template <typename data_t> nirio_status create_tx_fifo( - uint32_t fifo_instance, boost::shared_ptr<nirio_fifo<data_t>>& fifo) + uint32_t fifo_instance, std::shared_ptr<nirio_fifo<data_t>>& fifo) { if ((size_t)fifo_instance >= _lvbitx->get_output_fifo_count()) return NiRio_Status_InvalidParameter; @@ -60,7 +59,7 @@ public: template <typename data_t> nirio_status create_rx_fifo( - const char* fifo_name, boost::shared_ptr<nirio_fifo<data_t>>& fifo) + const char* fifo_name, std::shared_ptr<nirio_fifo<data_t>>& fifo) { if (!_session_open) return NiRio_Status_ResourceNotInitialized; @@ -69,7 +68,7 @@ public: template <typename data_t> nirio_status create_rx_fifo( - uint32_t fifo_instance, boost::shared_ptr<nirio_fifo<data_t>>& fifo) + uint32_t fifo_instance, std::shared_ptr<nirio_fifo<data_t>>& 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 <uhd/utils/log.hpp> #include <uhd/utils/noncopyable.hpp> #include <boost/asio.hpp> -#include <boost/smart_ptr.hpp> #include <boost/thread/condition_variable.hpp> #include <boost/thread/thread.hpp> +#include <memory> namespace uhd { namespace usrprio_rpc { @@ -68,7 +68,7 @@ private: // Services boost::asio::io_service _io_service; - boost::scoped_ptr<boost::thread> _io_service_thread; + std::unique_ptr<boost::thread> _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 <boost/archive/text_oarchive.hpp> #endif #include <stdint.h> +#include <memory> namespace uhd { namespace usrprio_rpc { @@ -131,9 +132,9 @@ public: private: std::istringstream _stream; #if (USE_BINARY_ARCHIVE) - boost::scoped_ptr<boost::archive::binary_iarchive> _archive; + std::unique_ptr<boost::archive::binary_iarchive> _archive; #else - boost::scoped_ptr<boost::archive::text_iarchive> _archive; + std::unique_ptr<boost::archive::text_iarchive> _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 <uhd/transport/zero_copy.hpp> #include <uhd/types/device_addr.hpp> #include <stdint.h> -#include <boost/shared_ptr.hpp> +#include <memory> namespace uhd { namespace transport { class UHD_API nirio_zero_copy : public virtual zero_copy_if { public: - typedef boost::shared_ptr<nirio_zero_copy> sptr; + typedef std::shared_ptr<nirio_zero_copy> 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 <uhd/config.hpp> #include <uhd/transport/zero_copy.hpp> #include <uhd/types/device_addr.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> 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 <uhd/types/serial.hpp> #include <uhd/utils/noncopyable.hpp> #include <boost/asio/buffer.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace uhd { namespace transport { class UHD_API udp_simple : uhd::noncopyable { public: - typedef boost::shared_ptr<udp_simple> sptr; + typedef std::shared_ptr<udp_simple> 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 <uhd/config.hpp> #include <uhd/transport/zero_copy.hpp> #include <uhd/types/device_addr.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace uhd { namespace transport { @@ -34,7 +34,7 @@ public: size_t send_buff_size; }; - typedef boost::shared_ptr<udp_zero_copy> sptr; + typedef std::shared_ptr<udp_zero_copy> 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 <uhd/transport/usb_device_handle.hpp> #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace uhd { namespace transport { class UHD_API usb_control : uhd::noncopyable { public: - typedef boost::shared_ptr<usb_control> sptr; + typedef std::shared_ptr<usb_control> 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 <uhd/config.hpp> #include <uhd/utils/noncopyable.hpp> #include <stdint.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <string> #include <vector> @@ -32,7 +32,7 @@ namespace uhd { namespace transport { class UHD_API usb_device_handle : uhd::noncopyable { public: - typedef boost::shared_ptr<usb_device_handle> sptr; + typedef std::shared_ptr<usb_device_handle> sptr; typedef std::pair<uint16_t, uint16_t> 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<usb_zero_copy> sptr; + typedef std::shared_ptr<usb_zero_copy> 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 <uhd/utils/noncopyable.hpp> #include <boost/detail/atomic_count.hpp> #include <boost/intrusive_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/utility.hpp> 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<zero_copy_if> sptr; + typedef std::shared_ptr<zero_copy_if> 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 <uhd/config.hpp> #include <uhd/transport/zero_copy.hpp> #include <boost/function.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace uhd { namespace transport { @@ -28,7 +28,7 @@ typedef boost::function<bool(managed_buffer::sptr buff)> flow_ctrl_func; class UHD_API zero_copy_flow_ctrl : public virtual zero_copy_if { public: - typedef boost::shared_ptr<zero_copy_flow_ctrl> sptr; + typedef std::shared_ptr<zero_copy_flow_ctrl> 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 <uhd/utils/log.hpp> #include <stdint.h> #include <boost/scoped_array.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <iostream> #include <ostream> #include <sstream> @@ -24,7 +24,7 @@ namespace uhd { class UHD_API filter_info_base { public: - typedef boost::shared_ptr<filter_info_base> sptr; + typedef std::shared_ptr<filter_info_base> 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<analog_filter_base> sptr; + typedef std::shared_ptr<analog_filter_base> 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<analog_filter_lp> sptr; + typedef std::shared_ptr<analog_filter_lp> sptr; analog_filter_lp(filter_type type, bool bypass, size_t position_index, @@ -130,7 +130,7 @@ protected: std::vector<tap_t> _taps; public: - typedef boost::shared_ptr<digital_filter_base> sptr; + typedef std::shared_ptr<digital_filter_base> sptr; digital_filter_base(filter_type type, bool bypass, size_t position_index, @@ -208,7 +208,7 @@ template <typename tap_t> class UHD_API digital_filter_fir : public digital_filter_base<tap_t> { public: - typedef boost::shared_ptr<digital_filter_fir<tap_t> > sptr; + typedef std::shared_ptr<digital_filter_fir<tap_t> > 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 <uhd/config.hpp> #include <stdint.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <string> #include <vector> @@ -36,7 +36,7 @@ typedef std::vector<uint8_t> byte_vector_t; class UHD_API i2c_iface { public: - typedef boost::shared_ptr<i2c_iface> sptr; + typedef std::shared_ptr<i2c_iface> 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<spi_iface> sptr; + typedef std::shared_ptr<spi_iface> sptr; virtual ~spi_iface(void); @@ -162,7 +162,7 @@ public: class UHD_API uart_iface { public: - typedef boost::shared_ptr<uart_iface> sptr; + typedef std::shared_ptr<uart_iface> 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 <uhd/config.hpp> #include <uhd/types/time_spec.hpp> #include <stdint.h> -#include <boost/shared_ptr.hpp> +#include <memory> namespace uhd { class UHD_API wb_iface { public: - typedef boost::shared_ptr<wb_iface> sptr; + typedef std::shared_ptr<wb_iface> 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<timed_wb_iface> sptr; + typedef std::shared_ptr<timed_wb_iface> 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 <uhd/usrp/dboard_id.hpp> #include <uhd/usrp/dboard_iface.hpp> #include <uhd/utils/pimpl.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <uhd/utils/noncopyable.hpp> namespace uhd { namespace usrp { @@ -25,7 +25,7 @@ namespace uhd { namespace usrp { class UHD_API dboard_base : uhd::noncopyable { public: - typedef boost::shared_ptr<dboard_base> sptr; + typedef std::shared_ptr<dboard_base> 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 <uhd/usrp/gpio_defs.hpp> #include <uhd/utils/pimpl.hpp> #include <stdint.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/thread/thread.hpp> #include <string> #include <vector> @@ -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<dboard_iface> sptr; + typedef std::shared_ptr<dboard_iface> 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 <uhd/usrp/dboard_base.hpp> #include <uhd/usrp/dboard_eeprom.hpp> #include <uhd/usrp/dboard_id.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <uhd/utils/noncopyable.hpp> #include <string> #include <vector> @@ -27,7 +27,7 @@ namespace uhd { namespace usrp { class UHD_API dboard_manager : uhd::noncopyable { public: - typedef boost::shared_ptr<dboard_manager> sptr; + typedef std::shared_ptr<dboard_manager> 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 <uhd/types/sensors.hpp> #include <uhd/types/serial.hpp> #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> namespace uhd { @@ -19,7 +19,7 @@ namespace uhd { class UHD_API gps_ctrl : uhd::noncopyable { public: - typedef boost::shared_ptr<gps_ctrl> sptr; + typedef std::shared_ptr<gps_ctrl> 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 <uhd/types/wb_iface.hpp> #include <uhd/usrp/dboard_iface.hpp> #include <uhd/usrp/subdev_spec.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <uhd/utils/noncopyable.hpp> #include <complex> #include <string> @@ -95,7 +95,7 @@ namespace usrp { class UHD_API multi_usrp : uhd::noncopyable { public: - typedef boost::shared_ptr<multi_usrp> sptr; + typedef std::shared_ptr<multi_usrp> 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<multi_usrp_clock> sptr; + typedef std::shared_ptr<multi_usrp_clock> 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 <uhd/types/ranges.hpp> #include <uhd/utils/noncopyable.hpp> #include <boost/function.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <string> #include <vector> @@ -31,7 +31,7 @@ struct UHD_API gain_fcns_t class UHD_API gain_group : uhd::noncopyable { public: - typedef boost::shared_ptr<gain_group> sptr; + typedef std::shared_ptr<gain_group> 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 <stdint.h> #include <boost/function.hpp> #include <boost/optional/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <uhd/utils/noncopyable.hpp> #include <vector> @@ -21,7 +21,7 @@ namespace uhd { class UHD_API msg_task : uhd::noncopyable { public: - typedef boost::shared_ptr<msg_task> sptr; + typedef std::shared_ptr<msg_task> sptr; typedef std::vector<uint8_t> msg_payload_t; typedef std::pair<uint32_t, msg_payload_t> msg_type_t; typedef boost::function<boost::optional<msg_type_t>(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 <uhd/config.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> /*! \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 <typename reg_data_t, bool readable, bool writable> class UHD_API soft_register_t : public soft_register_base { public: - typedef boost::shared_ptr<soft_register_t<reg_data_t, readable, writable> > sptr; + typedef std::shared_ptr<soft_register_t<reg_data_t, readable, writable> > 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<reg_data_t, readable, writable> { public: - typedef boost::shared_ptr<soft_register_sync_t<reg_data_t, readable, writable> > sptr; + typedef std::shared_ptr<soft_register_sync_t<reg_data_t, readable, writable> > 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<uint64_t, true, true> 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>(); + example_reg_t::sptr reg_sptr = std::make_shared<example_reg_t>(); 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<soft_regmap_accessor_t> sptr; + typedef std::shared_ptr<soft_regmap_accessor_t> 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<soft_regmap_db_t> sptr; + typedef std::shared_ptr<soft_regmap_db_t> 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 <uhd/config.hpp> #include <uhd/utils/noncopyable.hpp> #include <boost/function.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/utility.hpp> +#include <memory> +#include <string> namespace uhd { class UHD_API task : uhd::noncopyable { public: - typedef boost::shared_ptr<task> sptr; + typedef std::shared_ptr<task> sptr; typedef boost::function<void(void)> task_fcn_type; /*! |