diff options
author | Andrej Rode <mail@andrejro.de> | 2019-03-25 11:04:50 +0100 |
---|---|---|
committer | Marcus Müller <marcus.mueller@ettus.com> | 2019-04-19 17:37:26 +0200 |
commit | aa9e2ec7abd4f70f73ca9b83dc00c59cd7ba45d1 (patch) | |
tree | f4814d1ab025814986ccf1fc979fbff69540c80b /gnuradio-runtime/include/pmt/pmt.h | |
parent | 59c27e8bfac3c03fe1efdf9d45538941d3638df1 (diff) |
pmt: remove intrusive_ptr
Diffstat (limited to 'gnuradio-runtime/include/pmt/pmt.h')
-rw-r--r-- | gnuradio-runtime/include/pmt/pmt.h | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/gnuradio-runtime/include/pmt/pmt.h b/gnuradio-runtime/include/pmt/pmt.h index cb2191dd87..f7631f66d3 100644 --- a/gnuradio-runtime/include/pmt/pmt.h +++ b/gnuradio-runtime/include/pmt/pmt.h @@ -24,7 +24,7 @@ #define INCLUDED_PMT_H #include <pmt/api.h> -#include <boost/intrusive_ptr.hpp> +#include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> #include <boost/any.hpp> #include <complex> @@ -53,16 +53,47 @@ namespace pmt { /*! * \brief base class of all pmt types */ -class pmt_base; +class PMT_API pmt_base : boost::noncopyable { + + public: + pmt_base(){}; + virtual ~pmt_base(); + + virtual bool is_bool() const { return false; } + virtual bool is_symbol() const { return false; } + virtual bool is_number() const { return false; } + virtual bool is_integer() const { return false; } + virtual bool is_uint64() const { return false; } + virtual bool is_real() const { return false; } + virtual bool is_complex() const { return false; } + virtual bool is_null() const { return false; } + virtual bool is_pair() const { return false; } + virtual bool is_tuple() const { return false; } + virtual bool is_vector() const { return false; } + virtual bool is_dict() const { return false; } + virtual bool is_any() const { return false; } + + virtual bool is_uniform_vector() const { return false; } + virtual bool is_u8vector() const { return false; } + virtual bool is_s8vector() const { return false; } + virtual bool is_u16vector() const { return false; } + virtual bool is_s16vector() const { return false; } + virtual bool is_u32vector() const { return false; } + virtual bool is_s32vector() const { return false; } + virtual bool is_u64vector() const { return false; } + virtual bool is_s64vector() const { return false; } + virtual bool is_f32vector() const { return false; } + virtual bool is_f64vector() const { return false; } + virtual bool is_c32vector() const { return false; } + virtual bool is_c64vector() const { return false; } + +}; /*! * \brief typedef for shared pointer (transparent reference counting). * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm */ -typedef boost::intrusive_ptr<pmt_base> pmt_t; - -extern PMT_API void intrusive_ptr_add_ref(pmt_base*); -extern PMT_API void intrusive_ptr_release(pmt_base*); +typedef boost::shared_ptr<pmt_base> pmt_t; class PMT_API exception : public std::logic_error { |