summaryrefslogtreecommitdiff
path: root/gnuradio-runtime
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2020-03-14 12:01:44 +0000
committerMichael Dickens <michael.dickens@ettus.com>2020-04-01 11:44:45 -0400
commit7a9169fe8cca1cb378be0d0d403e03a338ffbfda (patch)
treefef77ae9c34538b78e4172580cb5ecdc24d40134 /gnuradio-runtime
parent82262753a56d15cfa6343044c726cf0035c38d9c (diff)
Switch from boost pointers to std C++11 pointers
Most of this code is automated code changes: ``` set -e SUB="s/dummy/dummy/" for i in shared_ptr make_shared dynamic_pointer_cast weak_ptr enable_shared_from_this get_deleter; do SUB="$SUB;s/boost::$i/std::$i/g" done SUB="$SUB;s^#include <boost/shared_ptr.hpp>^#include <memory>^g" SUB="$SUB;s^namespace boost^namespace std^g" find . \( -name "*.cc" -o -name "*.h" -o -name "*.i" -o -name "*.cxx" -o -name "*.py" \) -print0 | xargs -0 sed -i "$SUB" ``` Only one manual change. In `./gr-fec/lib/fec_mtrx_impl.cc`, add `#include <algorithm>`.
Diffstat (limited to 'gnuradio-runtime')
-rw-r--r--gnuradio-runtime/include/gnuradio/basic_block.h7
-rw-r--r--gnuradio-runtime/include/gnuradio/block.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/block_gateway.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/buffer.h10
-rw-r--r--gnuradio-runtime/include/gnuradio/hier_block2.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/io_signature.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/message.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/messages/msg_accepter.h4
-rw-r--r--gnuradio-runtime/include/gnuradio/messages/msg_producer.h4
-rw-r--r--gnuradio-runtime/include/gnuradio/messages/msg_queue.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/msg_handler.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/msg_queue.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/rpcmanager_base.h4
-rw-r--r--gnuradio-runtime/include/gnuradio/rpcregisterhelpers.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/rpcserver_base.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/rpcserver_booter_aggregator.h4
-rw-r--r--gnuradio-runtime/include/gnuradio/runtime_types.h18
-rw-r--r--gnuradio-runtime/include/gnuradio/sptr_magic.h10
-rw-r--r--gnuradio-runtime/include/gnuradio/thread/thread.h4
-rw-r--r--gnuradio-runtime/include/gnuradio/thrift_application_base.h4
-rw-r--r--gnuradio-runtime/include/gnuradio/thrift_server_template.h20
-rw-r--r--gnuradio-runtime/include/gnuradio/top_block.h2
-rw-r--r--gnuradio-runtime/include/gnuradio/types.h2
-rw-r--r--gnuradio-runtime/include/pmt/pmt.h8
-rw-r--r--gnuradio-runtime/include/pmt/pmt_sugar.h2
-rw-r--r--gnuradio-runtime/lib/basic_block.cc2
-rw-r--r--gnuradio-runtime/lib/buffer.cc2
-rw-r--r--gnuradio-runtime/lib/controlport/rpcmanager.cc1
-rw-r--r--gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc2
-rw-r--r--gnuradio-runtime/lib/hier_block2_detail.cc24
-rw-r--r--gnuradio-runtime/lib/scheduler.h2
-rw-r--r--gnuradio-runtime/lib/scheduler_tpb.cc2
-rw-r--r--gnuradio-runtime/lib/sptr_magic.cc2
-rw-r--r--gnuradio-runtime/lib/test.h2
-rw-r--r--gnuradio-runtime/swig/basic_block.i4
-rw-r--r--gnuradio-runtime/swig/block.i4
-rw-r--r--gnuradio-runtime/swig/block_detail.i4
-rw-r--r--gnuradio-runtime/swig/block_gateway.i2
-rw-r--r--gnuradio-runtime/swig/buffer.i8
-rw-r--r--gnuradio-runtime/swig/gr_shared_ptr.i4
-rw-r--r--gnuradio-runtime/swig/gr_swig_block_magic.i10
-rw-r--r--gnuradio-runtime/swig/gr_types.i2
-rw-r--r--gnuradio-runtime/swig/hier_block2.i4
-rw-r--r--gnuradio-runtime/swig/io_signature.i4
-rw-r--r--gnuradio-runtime/swig/message.i4
-rw-r--r--gnuradio-runtime/swig/msg_queue.i4
-rw-r--r--gnuradio-runtime/swig/pmt_swig.i10
-rw-r--r--gnuradio-runtime/swig/top_block.i2
48 files changed, 114 insertions, 114 deletions
diff --git a/gnuradio-runtime/include/gnuradio/basic_block.h b/gnuradio-runtime/include/gnuradio/basic_block.h
index 90c9c2f8bc..8a906283c3 100644
--- a/gnuradio-runtime/include/gnuradio/basic_block.h
+++ b/gnuradio-runtime/include/gnuradio/basic_block.h
@@ -17,7 +17,6 @@
#include <gnuradio/runtime_types.h>
#include <gnuradio/sptr_magic.h>
#include <gnuradio/thread/thread.h>
-#include <boost/enable_shared_from_this.hpp>
#include <boost/function.hpp>
#include <boost/thread/condition_variable.hpp>
#include <deque>
@@ -41,7 +40,7 @@ namespace gr {
* processing functions.
*/
class GR_RUNTIME_API basic_block : public msg_accepter,
- public boost::enable_shared_from_this<basic_block>
+ public std::enable_shared_from_this<basic_block>
{
typedef boost::function<void(pmt::pmt_t)> msg_handler_t;
@@ -53,7 +52,7 @@ private:
typedef std::map<pmt::pmt_t, msg_queue_t, pmt::comparator> msg_queue_map_t;
typedef std::map<pmt::pmt_t, msg_queue_t, pmt::comparator>::iterator
msg_queue_map_itr;
- std::map<pmt::pmt_t, boost::shared_ptr<boost::condition_variable>, pmt::comparator>
+ std::map<pmt::pmt_t, std::shared_ptr<boost::condition_variable>, pmt::comparator>
msg_queue_ready;
gr::thread::mutex mutex; //< protects all vars
@@ -291,7 +290,7 @@ public:
* store them. Each block has a vector to do this, and these never
* need to be accessed again once they are registered with the RPC
* backend. This function takes a
- * boost::shared_sptr<rpcbasic_base> so that when the block is
+ * std::shared_sptr<rpcbasic_base> so that when the block is
* deleted, all RPC registered variables are cleaned up.
*
* \param s an rpcbasic_sptr of the new RPC variable register to store.
diff --git a/gnuradio-runtime/include/gnuradio/block.h b/gnuradio-runtime/include/gnuradio/block.h
index 2f39cad5ce..51c232c44a 100644
--- a/gnuradio-runtime/include/gnuradio/block.h
+++ b/gnuradio-runtime/include/gnuradio/block.h
@@ -955,7 +955,7 @@ typedef std::vector<block_sptr>::iterator block_viter_t;
inline block_sptr cast_to_block_sptr(basic_block_sptr p)
{
- return boost::dynamic_pointer_cast<block, basic_block>(p);
+ return std::dynamic_pointer_cast<block, basic_block>(p);
}
GR_RUNTIME_API std::ostream& operator<<(std::ostream& os, const block* m);
diff --git a/gnuradio-runtime/include/gnuradio/block_gateway.h b/gnuradio-runtime/include/gnuradio/block_gateway.h
index 81bbf277dc..a4867f73a9 100644
--- a/gnuradio-runtime/include/gnuradio/block_gateway.h
+++ b/gnuradio-runtime/include/gnuradio/block_gateway.h
@@ -86,7 +86,7 @@ class GR_RUNTIME_API block_gateway : virtual public gr::block
{
public:
// gr::block_gateway::sptr
- typedef boost::shared_ptr<block_gateway> sptr;
+ typedef std::shared_ptr<block_gateway> sptr;
/*!
* Make a new gateway block.
diff --git a/gnuradio-runtime/include/gnuradio/buffer.h b/gnuradio-runtime/include/gnuradio/buffer.h
index a0ddbc1def..3b3404a415 100644
--- a/gnuradio-runtime/include/gnuradio/buffer.h
+++ b/gnuradio-runtime/include/gnuradio/buffer.h
@@ -158,7 +158,7 @@ private:
gr::vmcircbuf* d_vmcircbuf;
size_t d_sizeof_item; // in bytes
std::vector<buffer_reader*> d_readers;
- boost::weak_ptr<block> d_link; // block that writes to this buffer
+ std::weak_ptr<block> d_link; // block that writes to this buffer
//
// The mutex protects d_write_index, d_abs_write_offset, d_done, d_item_tags
@@ -333,10 +333,10 @@ private:
int delay);
buffer_sptr d_buffer;
- unsigned int d_read_index; // in items [0,d->buffer.d_bufsize)
- uint64_t d_abs_read_offset; // num items seen since the start
- boost::weak_ptr<block> d_link; // block that reads via this buffer reader
- unsigned d_attr_delay; // sample delay attribute for tag propagation
+ unsigned int d_read_index; // in items [0,d->buffer.d_bufsize)
+ uint64_t d_abs_read_offset; // num items seen since the start
+ std::weak_ptr<block> d_link; // block that reads via this buffer reader
+ unsigned d_attr_delay; // sample delay attribute for tag propagation
//! constructor is private. Use gr::buffer::add_reader to create instances
buffer_reader(buffer_sptr buffer, unsigned int read_index, block_sptr link);
diff --git a/gnuradio-runtime/include/gnuradio/hier_block2.h b/gnuradio-runtime/include/gnuradio/hier_block2.h
index aebbb3ac3b..d49fadb7e8 100644
--- a/gnuradio-runtime/include/gnuradio/hier_block2.h
+++ b/gnuradio-runtime/include/gnuradio/hier_block2.h
@@ -319,7 +319,7 @@ GR_RUNTIME_API std::string dot_graph(hier_block2_sptr hierblock2);
inline hier_block2_sptr cast_to_hier_block2_sptr(basic_block_sptr block)
{
- return boost::dynamic_pointer_cast<hier_block2, basic_block>(block);
+ return std::dynamic_pointer_cast<hier_block2, basic_block>(block);
}
} /* namespace gr */
diff --git a/gnuradio-runtime/include/gnuradio/io_signature.h b/gnuradio-runtime/include/gnuradio/io_signature.h
index f4a9106891..8d38e0d44c 100644
--- a/gnuradio-runtime/include/gnuradio/io_signature.h
+++ b/gnuradio-runtime/include/gnuradio/io_signature.h
@@ -31,7 +31,7 @@ class GR_RUNTIME_API io_signature
const std::vector<int>& sizeof_stream_items);
public:
- typedef boost::shared_ptr<io_signature> sptr;
+ typedef std::shared_ptr<io_signature> sptr;
static constexpr int IO_INFINITE = -1;
diff --git a/gnuradio-runtime/include/gnuradio/message.h b/gnuradio-runtime/include/gnuradio/message.h
index 2567e46c63..9a89d64bd3 100644
--- a/gnuradio-runtime/include/gnuradio/message.h
+++ b/gnuradio-runtime/include/gnuradio/message.h
@@ -27,7 +27,7 @@ namespace gr {
class GR_RUNTIME_API message
{
public:
- typedef boost::shared_ptr<message> sptr;
+ typedef std::shared_ptr<message> sptr;
private:
sptr d_next; // link field for msg queue
diff --git a/gnuradio-runtime/include/gnuradio/messages/msg_accepter.h b/gnuradio-runtime/include/gnuradio/messages/msg_accepter.h
index 80d837be4b..faeeb70a2d 100644
--- a/gnuradio-runtime/include/gnuradio/messages/msg_accepter.h
+++ b/gnuradio-runtime/include/gnuradio/messages/msg_accepter.h
@@ -13,7 +13,7 @@
#include <gnuradio/api.h>
#include <pmt/pmt.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace gr {
namespace messages {
@@ -37,7 +37,7 @@ public:
virtual void post(pmt::pmt_t which_port, pmt::pmt_t msg) = 0;
};
-typedef boost::shared_ptr<msg_accepter> msg_accepter_sptr;
+typedef std::shared_ptr<msg_accepter> msg_accepter_sptr;
} /* namespace messages */
} /* namespace gr */
diff --git a/gnuradio-runtime/include/gnuradio/messages/msg_producer.h b/gnuradio-runtime/include/gnuradio/messages/msg_producer.h
index 88c80f08d9..6152bf4473 100644
--- a/gnuradio-runtime/include/gnuradio/messages/msg_producer.h
+++ b/gnuradio-runtime/include/gnuradio/messages/msg_producer.h
@@ -13,7 +13,7 @@
#include <gnuradio/api.h>
#include <pmt/pmt.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace gr {
namespace messages {
@@ -33,7 +33,7 @@ public:
virtual pmt::pmt_t retrieve() = 0;
};
-typedef boost::shared_ptr<msg_producer> msg_producer_sptr;
+typedef std::shared_ptr<msg_producer> msg_producer_sptr;
} /* namespace messages */
} /* namespace gr */
diff --git a/gnuradio-runtime/include/gnuradio/messages/msg_queue.h b/gnuradio-runtime/include/gnuradio/messages/msg_queue.h
index 0fab90a672..aaf753cb72 100644
--- a/gnuradio-runtime/include/gnuradio/messages/msg_queue.h
+++ b/gnuradio-runtime/include/gnuradio/messages/msg_queue.h
@@ -20,7 +20,7 @@ namespace gr {
namespace messages {
class msg_queue;
-typedef boost::shared_ptr<msg_queue> msg_queue_sptr;
+typedef std::shared_ptr<msg_queue> msg_queue_sptr;
msg_queue_sptr make_msg_queue(unsigned int limit = 0);
diff --git a/gnuradio-runtime/include/gnuradio/msg_handler.h b/gnuradio-runtime/include/gnuradio/msg_handler.h
index f97488e5d8..f64f51509e 100644
--- a/gnuradio-runtime/include/gnuradio/msg_handler.h
+++ b/gnuradio-runtime/include/gnuradio/msg_handler.h
@@ -17,7 +17,7 @@
namespace gr {
class msg_handler;
-typedef boost::shared_ptr<msg_handler> msg_handler_sptr;
+typedef std::shared_ptr<msg_handler> msg_handler_sptr;
/*!
* \brief abstract class of message handlers
diff --git a/gnuradio-runtime/include/gnuradio/msg_queue.h b/gnuradio-runtime/include/gnuradio/msg_queue.h
index 7a0c8c4205..af1286345e 100644
--- a/gnuradio-runtime/include/gnuradio/msg_queue.h
+++ b/gnuradio-runtime/include/gnuradio/msg_queue.h
@@ -32,7 +32,7 @@ class GR_RUNTIME_API msg_queue : public msg_handler
unsigned int d_limit; // max # of messages in queue. 0 -> unbounded
public:
- typedef boost::shared_ptr<msg_queue> sptr;
+ typedef std::shared_ptr<msg_queue> sptr;
static sptr make(unsigned int limit = 0);
diff --git a/gnuradio-runtime/include/gnuradio/rpcmanager_base.h b/gnuradio-runtime/include/gnuradio/rpcmanager_base.h
index 9c2d0bb3fa..a23fe40596 100644
--- a/gnuradio-runtime/include/gnuradio/rpcmanager_base.h
+++ b/gnuradio-runtime/include/gnuradio/rpcmanager_base.h
@@ -11,7 +11,7 @@
#ifndef RPCMANAGER_BASE_H
#define RPCMANAGER_BASE_H
-#include <boost/shared_ptr.hpp>
+#include <memory>
class rpcserver_booter_base;
// class rpcserver_booter_aggregator;
@@ -19,7 +19,7 @@ class rpcserver_booter_base;
class rpcmanager_base
{
public:
- typedef boost::shared_ptr<rpcserver_booter_base> rpcserver_booter_base_sptr;
+ typedef std::shared_ptr<rpcserver_booter_base> rpcserver_booter_base_sptr;
rpcmanager_base() { ; }
~rpcmanager_base() { ; }
diff --git a/gnuradio-runtime/include/gnuradio/rpcregisterhelpers.h b/gnuradio-runtime/include/gnuradio/rpcregisterhelpers.h
index d48898b572..bb911e462c 100644
--- a/gnuradio-runtime/include/gnuradio/rpcregisterhelpers.h
+++ b/gnuradio-runtime/include/gnuradio/rpcregisterhelpers.h
@@ -21,7 +21,7 @@
// Fixes circular dependency issue before including block_registry.h
class rpcbasic_base;
-typedef boost::shared_ptr<rpcbasic_base> rpcbasic_sptr;
+typedef std::shared_ptr<rpcbasic_base> rpcbasic_sptr;
#include <gnuradio/block_registry.h>
diff --git a/gnuradio-runtime/include/gnuradio/rpcserver_base.h b/gnuradio-runtime/include/gnuradio/rpcserver_base.h
index 6a2f9492d6..57b4e9876b 100644
--- a/gnuradio-runtime/include/gnuradio/rpcserver_base.h
+++ b/gnuradio-runtime/include/gnuradio/rpcserver_base.h
@@ -33,7 +33,7 @@ public:
virtual void setCurPrivLevel(const priv_lvl_t priv) { cur_priv = priv; }
- typedef boost::shared_ptr<rpcserver_base> rpcserver_base_sptr;
+ typedef std::shared_ptr<rpcserver_base> rpcserver_base_sptr;
protected:
priv_lvl_t cur_priv;
diff --git a/gnuradio-runtime/include/gnuradio/rpcserver_booter_aggregator.h b/gnuradio-runtime/include/gnuradio/rpcserver_booter_aggregator.h
index f7ae2c7c1b..06831ffc27 100644
--- a/gnuradio-runtime/include/gnuradio/rpcserver_booter_aggregator.h
+++ b/gnuradio-runtime/include/gnuradio/rpcserver_booter_aggregator.h
@@ -14,7 +14,7 @@
#include <gnuradio/api.h>
#include <gnuradio/rpcserver_aggregator.h>
#include <gnuradio/rpcserver_booter_base.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
class rpcserver_server;
@@ -37,7 +37,7 @@ protected:
private:
std::string d_type;
- boost::shared_ptr<rpcserver_aggregator> server;
+ std::shared_ptr<rpcserver_aggregator> server;
};
#endif /* RPCSERVER_BOOTER_AGGREGATOR */
diff --git a/gnuradio-runtime/include/gnuradio/runtime_types.h b/gnuradio-runtime/include/gnuradio/runtime_types.h
index 774cca41b3..f78d91a778 100644
--- a/gnuradio-runtime/include/gnuradio/runtime_types.h
+++ b/gnuradio-runtime/include/gnuradio/runtime_types.h
@@ -29,15 +29,15 @@ class flat_flowgraph;
class flowgraph;
class top_block;
-typedef boost::shared_ptr<basic_block> basic_block_sptr;
-typedef boost::shared_ptr<block> block_sptr;
-typedef boost::shared_ptr<block_detail> block_detail_sptr;
-typedef boost::shared_ptr<buffer> buffer_sptr;
-typedef boost::shared_ptr<buffer_reader> buffer_reader_sptr;
-typedef boost::shared_ptr<hier_block2> hier_block2_sptr;
-typedef boost::shared_ptr<flat_flowgraph> flat_flowgraph_sptr;
-typedef boost::shared_ptr<flowgraph> flowgraph_sptr;
-typedef boost::shared_ptr<top_block> top_block_sptr;
+typedef std::shared_ptr<basic_block> basic_block_sptr;
+typedef std::shared_ptr<block> block_sptr;
+typedef std::shared_ptr<block_detail> block_detail_sptr;
+typedef std::shared_ptr<buffer> buffer_sptr;
+typedef std::shared_ptr<buffer_reader> buffer_reader_sptr;
+typedef std::shared_ptr<hier_block2> hier_block2_sptr;
+typedef std::shared_ptr<flat_flowgraph> flat_flowgraph_sptr;
+typedef std::shared_ptr<flowgraph> flowgraph_sptr;
+typedef std::shared_ptr<top_block> top_block_sptr;
} /* namespace gr */
diff --git a/gnuradio-runtime/include/gnuradio/sptr_magic.h b/gnuradio-runtime/include/gnuradio/sptr_magic.h
index 4d447885ab..fdcb68f91d 100644
--- a/gnuradio-runtime/include/gnuradio/sptr_magic.h
+++ b/gnuradio-runtime/include/gnuradio/sptr_magic.h
@@ -12,7 +12,7 @@
#define INCLUDED_GR_RUNTIME_SPTR_MAGIC_H
#include <gnuradio/api.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace gr {
class basic_block;
@@ -25,7 +25,7 @@ namespace detail {
class GR_RUNTIME_API sptr_magic
{
public:
- static boost::shared_ptr<gr::basic_block> fetch_initial_sptr(gr::basic_block* p);
+ static std::shared_ptr<gr::basic_block> fetch_initial_sptr(gr::basic_block* p);
static void create_and_stash_initial_sptr(gr::hier_block2* p);
static void cancel_initial_sptr(gr::hier_block2* p);
};
@@ -33,12 +33,12 @@ public:
/*
* \brief New! Improved! Standard method to get/create the
- * boost::shared_ptr for a block.
+ * std::shared_ptr for a block.
*/
template <class T>
-boost::shared_ptr<T> get_initial_sptr(T* p)
+std::shared_ptr<T> get_initial_sptr(T* p)
{
- return boost::dynamic_pointer_cast<T, gr::basic_block>(
+ return std::dynamic_pointer_cast<T, gr::basic_block>(
detail::sptr_magic::fetch_initial_sptr(p));
}
} // namespace gnuradio
diff --git a/gnuradio-runtime/include/gnuradio/thread/thread.h b/gnuradio-runtime/include/gnuradio/thread/thread.h
index 56b0c880e7..3683c9a124 100644
--- a/gnuradio-runtime/include/gnuradio/thread/thread.h
+++ b/gnuradio-runtime/include/gnuradio/thread/thread.h
@@ -12,12 +12,12 @@
#define INCLUDED_THREAD_H
#include <gnuradio/api.h>
-#include <boost/shared_ptr.hpp>
#include <boost/thread/barrier.hpp>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/locks.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
+#include <memory>
#include <vector>
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
@@ -38,7 +38,7 @@ typedef boost::mutex mutex;
typedef boost::unique_lock<boost::mutex> scoped_lock;
typedef boost::condition_variable condition_variable;
typedef boost::barrier barrier;
-typedef boost::shared_ptr<barrier> barrier_sptr;
+typedef std::shared_ptr<barrier> barrier_sptr;
/*! \brief a system-dependent typedef for the underlying thread type.
*/
diff --git a/gnuradio-runtime/include/gnuradio/thrift_application_base.h b/gnuradio-runtime/include/gnuradio/thrift_application_base.h
index 4d25029e56..642bba68b5 100644
--- a/gnuradio-runtime/include/gnuradio/thrift_application_base.h
+++ b/gnuradio-runtime/include/gnuradio/thrift_application_base.h
@@ -51,7 +51,7 @@ public:
// Stores the generated endpoint string after the Thrift runtime has initialized.
std::string d_endpointStr;
// Thread to execute the Thrift runtime's blocking serve() function.
- boost::shared_ptr<gr::thread::thread> d_start_thrift_thread;
+ std::shared_ptr<gr::thread::thread> d_start_thrift_thread;
};
/*!
@@ -114,7 +114,7 @@ protected:
/*!
* Reference to the Thrift runtime.
*/
- boost::scoped_ptr<apache::thrift::server::TServer> d_thriftserver;
+ std::unique_ptr<apache::thrift::server::TServer> d_thriftserver;
/*!
* Max number of attempts when checking the Thrift runtime for
diff --git a/gnuradio-runtime/include/gnuradio/thrift_server_template.h b/gnuradio-runtime/include/gnuradio/thrift_server_template.h
index a88f7fee48..df953ef10e 100644
--- a/gnuradio-runtime/include/gnuradio/thrift_server_template.h
+++ b/gnuradio-runtime/include/gnuradio/thrift_server_template.h
@@ -38,11 +38,11 @@ protected:
friend class thrift_application_base<TserverBase, TImplClass>;
private:
- boost::shared_ptr<TserverClass> d_handler;
- boost::shared_ptr<thrift::TProcessor> d_processor;
- boost::shared_ptr<thrift::transport::TServerTransport> d_serverTransport;
- boost::shared_ptr<thrift::transport::TTransportFactory> d_transportFactory;
- boost::shared_ptr<thrift::protocol::TProtocolFactory> d_protocolFactory;
+ std::shared_ptr<TserverClass> d_handler;
+ std::shared_ptr<thrift::TProcessor> d_processor;
+ std::shared_ptr<thrift::transport::TServerTransport> d_serverTransport;
+ std::shared_ptr<thrift::transport::TTransportFactory> d_transportFactory;
+ std::shared_ptr<thrift::protocol::TProtocolFactory> d_protocolFactory;
/**
* Custom TransportFactory that allows you to override the default Thrift buffer size
* of 512 bytes.
@@ -59,10 +59,10 @@ private:
virtual ~TBufferedTransportFactory() {}
- virtual boost::shared_ptr<thrift::transport::TTransport>
- getTransport(boost::shared_ptr<thrift::transport::TTransport> trans)
+ virtual std::shared_ptr<thrift::transport::TTransport>
+ getTransport(std::shared_ptr<thrift::transport::TTransport> trans)
{
- return boost::shared_ptr<thrift::transport::TTransport>(
+ return std::shared_ptr<thrift::transport::TTransport>(
new thrift::transport::TBufferedTransport(trans, bufferSize));
}
@@ -121,11 +121,11 @@ thrift_server_template<TserverBase, TserverClass, TImplClass>::thrift_server_tem
d_processor, d_serverTransport, d_transportFactory, d_protocolFactory));
} else {
// std::cout << "Thrift Multi-threaded server : " << d_nthreads << std::endl;
- boost::shared_ptr<thrift::concurrency::ThreadManager> threadManager(
+ std::shared_ptr<thrift::concurrency::ThreadManager> threadManager(
thrift::concurrency::ThreadManager::newSimpleThreadManager(nthreads));
threadManager->threadFactory(
- boost::shared_ptr<thrift::concurrency::PlatformThreadFactory>(
+ std::shared_ptr<thrift::concurrency::PlatformThreadFactory>(
new thrift::concurrency::PlatformThreadFactory()));
threadManager->start();
diff --git a/gnuradio-runtime/include/gnuradio/top_block.h b/gnuradio-runtime/include/gnuradio/top_block.h
index fb9ba0b5f4..5454aec035 100644
--- a/gnuradio-runtime/include/gnuradio/top_block.h
+++ b/gnuradio-runtime/include/gnuradio/top_block.h
@@ -134,7 +134,7 @@ public:
inline top_block_sptr cast_to_top_block_sptr(basic_block_sptr block)
{
- return boost::dynamic_pointer_cast<top_block, basic_block>(block);
+ return std::dynamic_pointer_cast<top_block, basic_block>(block);
}
} // namespace gr
diff --git a/gnuradio-runtime/include/gnuradio/types.h b/gnuradio-runtime/include/gnuradio/types.h
index d6209d5a0a..b9ecbffd1c 100644
--- a/gnuradio-runtime/include/gnuradio/types.h
+++ b/gnuradio-runtime/include/gnuradio/types.h
@@ -13,7 +13,7 @@
#include <gnuradio/api.h>
#include <stddef.h> // size_t
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <vector>
#include <gnuradio/gr_complex.h>
diff --git a/gnuradio-runtime/include/pmt/pmt.h b/gnuradio-runtime/include/pmt/pmt.h
index a96d5f22f7..886762ffa2 100644
--- a/gnuradio-runtime/include/pmt/pmt.h
+++ b/gnuradio-runtime/include/pmt/pmt.h
@@ -15,9 +15,9 @@
#include <stdint.h>
#include <boost/any.hpp>
#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
#include <complex>
#include <iosfwd>
+#include <memory>
#include <stdexcept>
#include <string>
#include <vector>
@@ -81,7 +81,7 @@ public:
* \brief typedef for shared pointer (transparent reference counting).
* See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
*/
-typedef boost::shared_ptr<pmt_base> pmt_t;
+typedef std::shared_ptr<pmt_base> pmt_t;
class PMT_API exception : public std::logic_error
{
@@ -703,10 +703,10 @@ PMT_API void any_set(pmt_t obj, const boost::any& any);
PMT_API bool is_msg_accepter(const pmt_t& obj);
//! make a msg_accepter
-PMT_API pmt_t make_msg_accepter(boost::shared_ptr<gr::messages::msg_accepter> ma);
+PMT_API pmt_t make_msg_accepter(std::shared_ptr<gr::messages::msg_accepter> ma);
//! Return underlying msg_accepter
-PMT_API boost::shared_ptr<gr::messages::msg_accepter> msg_accepter_ref(const pmt_t& obj);
+PMT_API std::shared_ptr<gr::messages::msg_accepter> msg_accepter_ref(const pmt_t& obj);
/*
* ------------------------------------------------------------------------
diff --git a/gnuradio-runtime/include/pmt/pmt_sugar.h b/gnuradio-runtime/include/pmt/pmt_sugar.h
index f6c5221cc2..78d3f012af 100644
--- a/gnuradio-runtime/include/pmt/pmt_sugar.h
+++ b/gnuradio-runtime/include/pmt/pmt_sugar.h
@@ -54,7 +54,7 @@ static inline pmt_t mp(std::complex<float> z)
}
//! Make pmt msg_accepter
-static inline pmt_t mp(boost::shared_ptr<gr::messages::msg_accepter> ma)
+static inline pmt_t mp(std::shared_ptr<gr::messages::msg_accepter> ma)
{
return make_msg_accepter(ma);
}
diff --git a/gnuradio-runtime/lib/basic_block.cc b/gnuradio-runtime/lib/basic_block.cc
index 88ad63cf39..f86051213c 100644
--- a/gnuradio-runtime/lib/basic_block.cc
+++ b/gnuradio-runtime/lib/basic_block.cc
@@ -75,7 +75,7 @@ void basic_block::message_port_register_in(pmt::pmt_t port_id)
}
msg_queue[port_id] = msg_queue_t();
msg_queue_ready[port_id] =
- boost::shared_ptr<boost::condition_variable>(new boost::condition_variable());
+ std::shared_ptr<boost::condition_variable>(new boost::condition_variable());
}
pmt::pmt_t basic_block::message_ports_in()
diff --git a/gnuradio-runtime/lib/buffer.cc b/gnuradio-runtime/lib/buffer.cc
index 7564741934..91cc43818b 100644
--- a/gnuradio-runtime/lib/buffer.cc
+++ b/gnuradio-runtime/lib/buffer.cc
@@ -47,7 +47,7 @@ static long s_buffer_reader_count = 0;
both want pointers to each other, and unless we do something, we'll
never delete any of them because of the circular structure.
They'll always have a reference count of at least one. We could
- use boost::weak_ptr's from gr::buffer to gr::buffer_reader but that
+ use std::weak_ptr's from gr::buffer to gr::buffer_reader but that
introduces it's own problems. (gr::buffer_reader's destructor needs
to call gr::buffer::drop_reader, but has no easy way to get a
shared_ptr to itself.)
diff --git a/gnuradio-runtime/lib/controlport/rpcmanager.cc b/gnuradio-runtime/lib/controlport/rpcmanager.cc
index 0699fa46c2..cd911a8fda 100644
--- a/gnuradio-runtime/lib/controlport/rpcmanager.cc
+++ b/gnuradio-runtime/lib/controlport/rpcmanager.cc
@@ -9,6 +9,7 @@
*/
#include <gnuradio/rpcmanager.h>
+#include <cassert>
#include <iostream>
#include <stdexcept>
diff --git a/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc b/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc
index bca30c5053..4102191a3d 100644
--- a/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc
+++ b/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc
@@ -79,7 +79,7 @@ const unsigned int thrift_application_base<rpcserver_base, rpcserver_booter_thri
d_default_thrift_buffer_size(ALRIGHT_DEFAULT_BUFFER_SIZE);
template <class rpcserver_base, class rpcserver_booter_thrift>
-boost::scoped_ptr<thrift_application_base_impl>
+std::unique_ptr<thrift_application_base_impl>
thrift_application_base<rpcserver_base, rpcserver_booter_thrift>::p_impl(
new thrift_application_base_impl());
diff --git a/gnuradio-runtime/lib/hier_block2_detail.cc b/gnuradio-runtime/lib/hier_block2_detail.cc
index 02b324cfeb..512cfaa33e 100644
--- a/gnuradio-runtime/lib/hier_block2_detail.cc
+++ b/gnuradio-runtime/lib/hier_block2_detail.cc
@@ -581,7 +581,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
if (set_all_min_buff) {
// sets the min buff for every block within hier_block2
if (min_buff != 0) {
- block_sptr bb = boost::dynamic_pointer_cast<block>(b);
+ block_sptr bb = std::dynamic_pointer_cast<block>(b);
if (bb != 0) {
if (bb->min_output_buffer(0) != min_buff) {
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -590,7 +590,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
bb->set_min_output_buffer(min_buff);
}
} else {
- hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b);
+ hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(b);
if (hh != 0) {
if (hh->min_output_buffer(0) != min_buff) {
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -606,7 +606,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
if (set_all_max_buff) {
// sets the max buff for every block within hier_block2
if (max_buff != 0) {
- block_sptr bb = boost::dynamic_pointer_cast<block>(b);
+ block_sptr bb = std::dynamic_pointer_cast<block>(b);
if (bb != 0) {
if (bb->max_output_buffer(0) != max_buff) {
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -615,7 +615,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
bb->set_max_output_buffer(max_buff);
}
} else {
- hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b);
+ hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(b);
if (hh != 0) {
if (hh->max_output_buffer(0) != max_buff) {
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -633,7 +633,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
if (set_all_min_buff) {
// sets the min buff for every block within hier_block2
if (min_buff != 0) {
- block_sptr bb = boost::dynamic_pointer_cast<block>(b);
+ block_sptr bb = std::dynamic_pointer_cast<block>(b);
if (bb != 0) {
if (bb->min_output_buffer(0) != min_buff) {
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -642,7 +642,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
bb->set_min_output_buffer(min_buff);
}
} else {
- hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b);
+ hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(b);
if (hh != 0) {
if (hh->min_output_buffer(0) != min_buff) {
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -658,7 +658,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
if (set_all_max_buff) {
// sets the max buff for every block within hier_block2
if (max_buff != 0) {
- block_sptr bb = boost::dynamic_pointer_cast<block>(b);
+ block_sptr bb = std::dynamic_pointer_cast<block>(b);
if (bb != 0) {
if (bb->max_output_buffer(0) != max_buff) {
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -667,7 +667,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
bb->set_max_output_buffer(max_buff);
}
} else {
- hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(b);
+ hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(b);
if (hh != 0) {
if (hh->max_output_buffer(0) != max_buff) {
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -793,7 +793,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
if (!set_all_min_buff) {
min_buff = d_owner->min_output_buffer(i);
if (min_buff != 0) {
- block_sptr bb = boost::dynamic_pointer_cast<block>(blk);
+ block_sptr bb = std::dynamic_pointer_cast<block>(blk);
if (bb != 0) {
int bb_src_port = d_outputs[i].port();
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -802,7 +802,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
<< std::endl;
bb->set_min_output_buffer(bb_src_port, min_buff);
} else {
- hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(blk);
+ hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(blk);
if (hh != 0) {
int hh_src_port = d_outputs[i].port();
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -817,7 +817,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
if (!set_all_max_buff) {
max_buff = d_owner->max_output_buffer(i);
if (max_buff != 0) {
- block_sptr bb = boost::dynamic_pointer_cast<block>(blk);
+ block_sptr bb = std::dynamic_pointer_cast<block>(blk);
if (bb != 0) {
int bb_src_port = d_outputs[i].port();
if (HIER_BLOCK2_DETAIL_DEBUG)
@@ -826,7 +826,7 @@ void hier_block2_detail::flatten_aux(flat_flowgraph_sptr sfg) const
<< std::endl;
bb->set_max_output_buffer(bb_src_port, max_buff);
} else {
- hier_block2_sptr hh = boost::dynamic_pointer_cast<hier_block2>(blk);
+ hier_block2_sptr hh = std::dynamic_pointer_cast<hier_block2>(blk);
if (hh != 0) {
int hh_src_port = d_outputs[i].port();
if (HIER_BLOCK2_DETAIL_DEBUG)
diff --git a/gnuradio-runtime/lib/scheduler.h b/gnuradio-runtime/lib/scheduler.h
index 448895d72a..e56f0bfb19 100644
--- a/gnuradio-runtime/lib/scheduler.h
+++ b/gnuradio-runtime/lib/scheduler.h
@@ -19,7 +19,7 @@
namespace gr {
class scheduler;
-typedef boost::shared_ptr<scheduler> scheduler_sptr;
+typedef std::shared_ptr<scheduler> scheduler_sptr;
/*!
* \brief Abstract scheduler that takes a flattened flow graph and
diff --git a/gnuradio-runtime/lib/scheduler_tpb.cc b/gnuradio-runtime/lib/scheduler_tpb.cc
index 25fc836b96..f04be4227d 100644
--- a/gnuradio-runtime/lib/scheduler_tpb.cc
+++ b/gnuradio-runtime/lib/scheduler_tpb.cc
@@ -68,7 +68,7 @@ scheduler_tpb::scheduler_tpb(flat_flowgraph_sptr ffg,
}
thread::barrier_sptr start_sync =
- boost::make_shared<thread::barrier>(blocks.size() + 1);
+ std::make_shared<thread::barrier>(blocks.size() + 1);
// Fire off a thead for each block
diff --git a/gnuradio-runtime/lib/sptr_magic.cc b/gnuradio-runtime/lib/sptr_magic.cc
index f8529cabdf..0dd1f58666 100644
--- a/gnuradio-runtime/lib/sptr_magic.cc
+++ b/gnuradio-runtime/lib/sptr_magic.cc
@@ -54,7 +54,7 @@ void detail::sptr_magic::cancel_initial_sptr(gr::hier_block2* p)
return; /* Not in the map, nothing to do */
gr::basic_block_sptr sptr = pos->second;
s_map.erase(pos);
- boost::get_deleter<disarmable_deleter, gr::basic_block>(sptr)->disarm();
+ std::get_deleter<disarmable_deleter, gr::basic_block>(sptr)->disarm();
}
gr::basic_block_sptr detail::sptr_magic::fetch_initial_sptr(gr::basic_block* p)
diff --git a/gnuradio-runtime/lib/test.h b/gnuradio-runtime/lib/test.h
index 0d7b0cf6cf..ab03231861 100644
--- a/gnuradio-runtime/lib/test.h
+++ b/gnuradio-runtime/lib/test.h
@@ -19,7 +19,7 @@
namespace gr {
class test;
-typedef boost::shared_ptr<test> test_sptr;
+typedef std::shared_ptr<test> test_sptr;
// public constructor
GR_RUNTIME_API test_sptr make_test(const std::string& name = std::string("test"),
diff --git a/gnuradio-runtime/swig/basic_block.i b/gnuradio-runtime/swig/basic_block.i
index 7864ef3e95..3ded09031a 100644
--- a/gnuradio-runtime/swig/basic_block.i
+++ b/gnuradio-runtime/swig/basic_block.i
@@ -9,8 +9,8 @@
*/
class gr::basic_block;
-typedef boost::shared_ptr<gr::basic_block> gr::basic_block_sptr;
-%template(basic_block_sptr) boost::shared_ptr<gr::basic_block>;
+typedef std::shared_ptr<gr::basic_block> gr::basic_block_sptr;
+%template(basic_block_sptr) std::shared_ptr<gr::basic_block>;
%import "pmt_swig.i"
diff --git a/gnuradio-runtime/swig/block.i b/gnuradio-runtime/swig/block.i
index d931f505e9..fb21dd1447 100644
--- a/gnuradio-runtime/swig/block.i
+++ b/gnuradio-runtime/swig/block.i
@@ -11,8 +11,8 @@
%include <basic_block.i>
class gr::block;
-typedef boost::shared_ptr<gr::block> gr::block_sptr;
-%template(block_sptr) boost::shared_ptr<gr::block>;
+typedef std::shared_ptr<gr::block> gr::block_sptr;
+%template(block_sptr) std::shared_ptr<gr::block>;
// support vectors of these...
namespace std {
diff --git a/gnuradio-runtime/swig/block_detail.i b/gnuradio-runtime/swig/block_detail.i
index a2af931909..6e335aaf36 100644
--- a/gnuradio-runtime/swig/block_detail.i
+++ b/gnuradio-runtime/swig/block_detail.i
@@ -9,8 +9,8 @@
*/
class gr::block_detail;
-typedef boost::shared_ptr<gr::block_detail> gr::block_detail_sptr;
-%template(block_detail_sptr) boost::shared_ptr<gr::block_detail>;
+typedef std::shared_ptr<gr::block_detail> gr::block_detail_sptr;
+%template(block_detail_sptr) std::shared_ptr<gr::block_detail>;
%rename(block_detail) gr::make_block_detail;
%ignore gr::block_detail;
diff --git a/gnuradio-runtime/swig/block_gateway.i b/gnuradio-runtime/swig/block_gateway.i
index a2fb4e5e99..b95b045b72 100644
--- a/gnuradio-runtime/swig/block_gateway.i
+++ b/gnuradio-runtime/swig/block_gateway.i
@@ -29,7 +29,7 @@
////////////////////////////////////////////////////////////////////////
%include <gnuradio/block_gateway.h>
-%template(block_gateway_sptr) boost::shared_ptr<gr::block_gateway>;
+%template(block_gateway_sptr) std::shared_ptr<gr::block_gateway>;
%pythoncode %{
block_gateway_sptr.__repr__ = lambda self: "<block_gateway>"
block_gateway = block_gateway.make;
diff --git a/gnuradio-runtime/swig/buffer.i b/gnuradio-runtime/swig/buffer.i
index 09219881d9..a95c7996a0 100644
--- a/gnuradio-runtime/swig/buffer.i
+++ b/gnuradio-runtime/swig/buffer.i
@@ -9,8 +9,8 @@
*/
class gr::buffer;
-typedef boost::shared_ptr<gr::buffer> gr::buffer_sptr;
-%template(buffer_sptr) boost::shared_ptr<gr::buffer>;
+typedef std::shared_ptr<gr::buffer> gr::buffer_sptr;
+%template(buffer_sptr) std::shared_ptr<gr::buffer>;
%rename(buffer) gr::make_buffer;
%ignore gr::buffer;
@@ -18,8 +18,8 @@ gr::buffer_sptr
gr::make_buffer (int nitems, size_t sizeof_item, gr::block_sptr link);
class gr::buffer_reader;
-typedef boost::shared_ptr<gr::buffer_reader> gr::buffer_reader_sptr;
-%template(buffer_reader_sptr) boost::shared_ptr<gr::buffer_reader>;
+typedef std::shared_ptr<gr::buffer_reader> gr::buffer_reader_sptr;
+%template(buffer_reader_sptr) std::shared_ptr<gr::buffer_reader>;
%ignore gr::buffer_reader;
%rename(buffer_add_reader) gr::buffer_add_reader;
diff --git a/gnuradio-runtime/swig/gr_shared_ptr.i b/gnuradio-runtime/swig/gr_shared_ptr.i
index 323d33ad73..3e601038f5 100644
--- a/gnuradio-runtime/swig/gr_shared_ptr.i
+++ b/gnuradio-runtime/swig/gr_shared_ptr.i
@@ -7,12 +7,12 @@
//
//
-// This is highly hacked up version of boost::shared_ptr
+// This is highly hacked up version of std::shared_ptr
// We just need enough to get SWIG to "do the right thing" and
// generate "Smart Pointer" code.
//
-namespace boost {
+namespace std {
template<class T> class shared_ptr
{
diff --git a/gnuradio-runtime/swig/gr_swig_block_magic.i b/gnuradio-runtime/swig/gr_swig_block_magic.i
index 06c9180654..82f79b5e76 100644
--- a/gnuradio-runtime/swig/gr_swig_block_magic.i
+++ b/gnuradio-runtime/swig/gr_swig_block_magic.i
@@ -14,8 +14,8 @@ _GR_SWIG_BLOCK_MAGIC_HELPER(PKG, BASE_NAME, PKG ## _ ## BASE_NAME)
%define _GR_SWIG_BLOCK_MAGIC_HELPER_COMMON(PKG, BASE_NAME, FULL_NAME)
class FULL_NAME;
-typedef boost::shared_ptr<FULL_NAME> FULL_NAME ## _sptr;
-%template(FULL_NAME ## _sptr) boost::shared_ptr<FULL_NAME>;
+typedef std::shared_ptr<FULL_NAME> FULL_NAME ## _sptr;
+%template(FULL_NAME ## _sptr) std::shared_ptr<FULL_NAME>;
%rename(BASE_NAME) PKG ## _make_ ## BASE_NAME;
%ignore FULL_NAME;
%enddef
@@ -30,7 +30,7 @@ FULL_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(),
#endif
%define GR_SWIG_BLOCK_MAGIC2(PKG, BASE_NAME)
-%template(BASE_NAME ## _sptr) boost::shared_ptr<gr:: ## PKG ## :: ## BASE_NAME>;
+%template(BASE_NAME ## _sptr) std::shared_ptr<gr:: ## PKG ## :: ## BASE_NAME>;
%pythoncode %{
BASE_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id())
BASE_NAME = BASE_NAME.make;
@@ -39,7 +39,7 @@ BASE_NAME = BASE_NAME.make;
%define GR_SWIG_BLOCK_MAGIC2_TMPL(PKG, BASE_NAME, TARGET_NAME...)
%template(BASE_NAME) gr:: ## PKG ## :: ## TARGET_NAME;
-%template(BASE_NAME ## _sptr) boost::shared_ptr<gr:: ## PKG ## :: ## TARGET_NAME ## >;
+%template(BASE_NAME ## _sptr) std::shared_ptr<gr:: ## PKG ## :: ## TARGET_NAME ## >;
%pythoncode %{
BASE_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id())
BASE_NAME = BASE_NAME.make
@@ -48,7 +48,7 @@ BASE_NAME = BASE_NAME.make
%define GR_SWIG_BLOCK_MAGIC_FACTORY(PKG, BASE_NAME, FACTORY)
-%template(FACTORY ## _sptr) boost::shared_ptr<gr:: ## PKG ## :: ## BASE_NAME>;
+%template(FACTORY ## _sptr) std::shared_ptr<gr:: ## PKG ## :: ## BASE_NAME>;
%pythoncode %{
FACTORY ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id())
FACTORY = BASE_NAME ## _make_ ## FACTORY;
diff --git a/gnuradio-runtime/swig/gr_types.i b/gnuradio-runtime/swig/gr_types.i
index b703a3168d..8fbc597e76 100644
--- a/gnuradio-runtime/swig/gr_types.i
+++ b/gnuradio-runtime/swig/gr_types.i
@@ -14,7 +14,7 @@
%include "stdint.i"
%{
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/any.hpp>
#include <complex>
#include <string>
diff --git a/gnuradio-runtime/swig/hier_block2.i b/gnuradio-runtime/swig/hier_block2.i
index 51356c233b..0b21870c5c 100644
--- a/gnuradio-runtime/swig/hier_block2.i
+++ b/gnuradio-runtime/swig/hier_block2.i
@@ -11,8 +11,8 @@
%include <basic_block.i>
class gr::hier_block2;
-typedef boost::shared_ptr<gr::hier_block2> gr::hier_block2_sptr;
-%template(hier_block2_sptr) boost::shared_ptr<gr::hier_block2>;
+typedef std::shared_ptr<gr::hier_block2> gr::hier_block2_sptr;
+%template(hier_block2_sptr) std::shared_ptr<gr::hier_block2>;
namespace gr {
// Hack to have a Python shim implementation of gr.hier_block2
diff --git a/gnuradio-runtime/swig/io_signature.i b/gnuradio-runtime/swig/io_signature.i
index 9514fabd57..7fc029fc07 100644
--- a/gnuradio-runtime/swig/io_signature.i
+++ b/gnuradio-runtime/swig/io_signature.i
@@ -16,7 +16,7 @@ namespace gr {
const std::vector<int> &sizeof_stream_items);
public:
- typedef boost::shared_ptr<io_signature> sptr;
+ typedef std::shared_ptr<io_signature> sptr;
// Avoids a swig warning, otherwise we could just
// #include <gnuradio/io_signature.h> instead of redoing this
@@ -47,7 +47,7 @@ namespace gr {
} /* namespace gr */
-%template(io_signature_sptr) boost::shared_ptr<gr::io_signature>;
+%template(io_signature_sptr) std::shared_ptr<gr::io_signature>;
%pythoncode %{
io_signature_sptr.__repr__ = lambda self: "<io_signature: %d, %d>" % (self.min_streams(), self.max_streams())
io_signaturev = io_signature.makev;
diff --git a/gnuradio-runtime/swig/message.i b/gnuradio-runtime/swig/message.i
index 36fa9e9274..4265d3a9ab 100644
--- a/gnuradio-runtime/swig/message.i
+++ b/gnuradio-runtime/swig/message.i
@@ -25,7 +25,7 @@ namespace gr {
class message
{
public:
- typedef boost::shared_ptr<message> sptr;
+ typedef std::shared_ptr<message> sptr;
private:
message(long type, double arg1, double arg2, size_t length);
@@ -59,7 +59,7 @@ namespace gr {
-%template(message_sptr) boost::shared_ptr<gr::message>;
+%template(message_sptr) std::shared_ptr<gr::message>;
%pythoncode %{
message_from_string = message.make_from_string
message = message.make
diff --git a/gnuradio-runtime/swig/msg_queue.i b/gnuradio-runtime/swig/msg_queue.i
index 166c3c7541..20ca9d16ef 100644
--- a/gnuradio-runtime/swig/msg_queue.i
+++ b/gnuradio-runtime/swig/msg_queue.i
@@ -15,7 +15,7 @@ namespace gr {
class msg_queue : public gr::msg_handler
{
public:
- typedef boost::shared_ptr<msg_queue> sptr;
+ typedef std::shared_ptr<msg_queue> sptr;
static sptr make(unsigned int limit=0);
@@ -86,7 +86,7 @@ namespace gr {
%}
// smash in new python delete_head and insert_tail methods...
-%template(msg_queue_sptr) boost::shared_ptr<gr::msg_queue>;
+%template(msg_queue_sptr) std::shared_ptr<gr::msg_queue>;
%pythoncode %{
msg_queue_sptr.delete_head = py_msg_queue__delete_head
msg_queue_sptr.insert_tail = py_msg_queue__insert_tail
diff --git a/gnuradio-runtime/swig/pmt_swig.i b/gnuradio-runtime/swig/pmt_swig.i
index 16a9b8fd9d..c4af239351 100644
--- a/gnuradio-runtime/swig/pmt_swig.i
+++ b/gnuradio-runtime/swig/pmt_swig.i
@@ -14,7 +14,7 @@
%include "stdint.i"
%{
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/any.hpp>
#include <complex>
#include <string>
@@ -67,11 +67,11 @@ namespace pmt {
// Language independent exception handler
////////////////////////////////////////////////////////////////////////
-%template(swig_pmt_ptr) boost::shared_ptr<pmt::pmt_base>;
+%template(swig_pmt_ptr) std::shared_ptr<pmt::pmt_base>;
namespace pmt{
class pmt_base;
- typedef boost::shared_ptr<pmt::pmt_base> pmt_t;
+ typedef std::shared_ptr<pmt::pmt_base> pmt_t;
%pythoncode
%{
@@ -253,8 +253,8 @@ namespace pmt{
void any_set(pmt_t obj, const boost::any &any);
bool is_msg_accepter(const pmt_t &obj);
- pmt_t make_msg_accepter(boost::shared_ptr<gr::messages::msg_accepter> ma);
- boost::shared_ptr<gr::messages::msg_accepter> msg_accepter_ref(const pmt_t &obj);
+ pmt_t make_msg_accepter(std::shared_ptr<gr::messages::msg_accepter> ma);
+ std::shared_ptr<gr::messages::msg_accepter> msg_accepter_ref(const pmt_t &obj);
bool eq(const pmt_t& x, const pmt_t& y);
bool eqv(const pmt_t& x, const pmt_t& y);
diff --git a/gnuradio-runtime/swig/top_block.i b/gnuradio-runtime/swig/top_block.i
index aec6218c1d..71a0fd2c45 100644
--- a/gnuradio-runtime/swig/top_block.i
+++ b/gnuradio-runtime/swig/top_block.i
@@ -8,7 +8,7 @@
*
*/
-%template(top_block_sptr) boost::shared_ptr<gr::top_block>;
+%template(top_block_sptr) std::shared_ptr<gr::top_block>;
namespace gr {
// Hack to have a Python shim implementation of gr.top_block