]> sigrok.org Git - pulseview.git/commitdiff
Replaced boost::shared_ptr with std::shared_ptr
authorJoel Holdsworth <redacted>
Tue, 20 May 2014 21:58:55 +0000 (22:58 +0100)
committerJoel Holdsworth <redacted>
Sat, 24 May 2014 08:10:00 +0000 (09:10 +0100)
54 files changed:
pv/data/analog.cpp
pv/data/analog.h
pv/data/decode/decoder.cpp
pv/data/decode/decoder.h
pv/data/decoderstack.cpp
pv/data/decoderstack.h
pv/data/logic.cpp
pv/data/logic.h
pv/device/device.cpp
pv/device/devinst.h
pv/device/sessionfile.cpp
pv/devicemanager.cpp
pv/devicemanager.h
pv/dialogs/connect.cpp
pv/dialogs/connect.h
pv/dialogs/storeprogress.h
pv/mainwindow.cpp
pv/mainwindow.h
pv/popups/deviceoptions.cpp
pv/popups/deviceoptions.h
pv/popups/probes.cpp
pv/popups/probes.h
pv/prop/binding/binding.cpp
pv/prop/binding/binding.h
pv/prop/binding/decoderoptions.cpp
pv/prop/binding/decoderoptions.h
pv/prop/binding/deviceoptions.cpp
pv/prop/binding/deviceoptions.h
pv/sigsession.cpp
pv/sigsession.h
pv/storesession.cpp
pv/storesession.h
pv/toolbars/samplingbar.cpp
pv/toolbars/samplingbar.h
pv/view/analogsignal.cpp
pv/view/analogsignal.h
pv/view/cursor.cpp
pv/view/cursor.h
pv/view/cursorpair.cpp
pv/view/cursorpair.h
pv/view/decodetrace.cpp
pv/view/decodetrace.h
pv/view/header.cpp
pv/view/header.h
pv/view/logicsignal.cpp
pv/view/logicsignal.h
pv/view/ruler.cpp
pv/view/ruler.h
pv/view/signal.cpp
pv/view/signal.h
pv/view/view.cpp
pv/view/view.h
pv/view/viewport.cpp
test/data/decoderstack.cpp

index c7430432613c3eadbf373e25b16374f0a1cb980f..53fa9a5a62b117c5a1258cdc09dd05d1fc1cf446 100644 (file)
@@ -21,9 +21,9 @@
 #include "analog.h"
 #include "analogsnapshot.h"
 
-using boost::shared_ptr;
 using std::deque;
 using std::max;
+using std::shared_ptr;
 
 namespace pv {
 namespace data {
@@ -51,7 +51,7 @@ void Analog::clear()
 uint64_t Analog::get_max_sample_count() const
 {
        uint64_t l = 0;
-       for (const boost::shared_ptr<AnalogSnapshot> s : _snapshots) {
+       for (const std::shared_ptr<AnalogSnapshot> s : _snapshots) {
                assert(s);
                l = max(l, s->get_sample_count());
        }
index 42e31677ebdcae8f350fc5ebbfd859d99ba86914..7e36edd6e8abd1b782dac745163f26f430660f69 100644 (file)
@@ -23,8 +23,8 @@
 
 #include "signaldata.h"
 
-#include <boost/shared_ptr.hpp>
 #include <deque>
+#include <memory>
 
 namespace pv {
 namespace data {
@@ -37,9 +37,9 @@ public:
        Analog();
 
        void push_snapshot(
-               boost::shared_ptr<AnalogSnapshot> &snapshot);
+               std::shared_ptr<AnalogSnapshot> &snapshot);
 
-       std::deque< boost::shared_ptr<AnalogSnapshot> >&
+       std::deque< std::shared_ptr<AnalogSnapshot> >&
                get_snapshots();
 
        void clear();
@@ -47,7 +47,7 @@ public:
        uint64_t get_max_sample_count() const;
 
 private:
-       std::deque< boost::shared_ptr<AnalogSnapshot> > _snapshots;
+       std::deque< std::shared_ptr<AnalogSnapshot> > _snapshots;
 };
 
 } // namespace data
index 13c40a355aafdad2aa3961e7be524bfb8a510616..db9816c4169f6bc131330274c51a25de88e54ef9 100644 (file)
@@ -25,9 +25,9 @@
 
 #include <pv/view/logicsignal.h>
 
-using boost::shared_ptr;
 using std::set;
 using std::map;
+using std::shared_ptr;
 using std::string;
 
 namespace pv {
@@ -68,7 +68,7 @@ Decoder::channels() const
 }
 
 void Decoder::set_probes(std::map<const srd_channel*,
-       boost::shared_ptr<view::LogicSignal> > probes)
+       std::shared_ptr<view::LogicSignal> > probes)
 {
        _probes = probes;
 }
index dffefab22e2119f6a44fc7a2dbe869196320d431..3920aa4c40012f4313631984c434d6cd3d14ed66 100644 (file)
 #define PULSEVIEW_PV_DATA_DECODE_DECODER_H
 
 #include <map>
+#include <memory>
 #include <set>
 
-#include <boost/shared_ptr.hpp>
-
 #include <glib.h>
 
 struct srd_decoder;
@@ -58,9 +57,9 @@ public:
        void show(bool show = true);
 
        const std::map<const srd_channel*,
-               boost::shared_ptr<view::LogicSignal> >& channels() const;
+               std::shared_ptr<view::LogicSignal> >& channels() const;
        void set_probes(std::map<const srd_channel*,
-               boost::shared_ptr<view::LogicSignal> > probes);
+               std::shared_ptr<view::LogicSignal> > probes);
 
        const std::map<std::string, GVariant*>& options() const;
 
@@ -71,14 +70,14 @@ public:
        srd_decoder_inst* create_decoder_inst(
                srd_session *session, int unit_size) const;
 
-       std::set< boost::shared_ptr<pv::data::Logic> > get_data();      
+       std::set< std::shared_ptr<pv::data::Logic> > get_data();        
 
 private:
        const srd_decoder *const _decoder;
 
        bool _shown;
 
-       std::map<const srd_channel*, boost::shared_ptr<pv::view::LogicSignal> >
+       std::map<const srd_channel*, std::shared_ptr<pv::view::LogicSignal> >
                _probes;
        std::map<std::string, GVariant*> _options;
 };
index 1cb7d4ff126f7fda54dfac544a24a599e91dd67d..40683758a4c1280de4815e7439e09e68fc5e47cf 100644 (file)
@@ -38,7 +38,6 @@
 using boost::lock_guard;
 using boost::mutex;
 using boost::optional;
-using boost::shared_ptr;
 using boost::unique_lock;
 using std::deque;
 using std::make_pair;
@@ -47,6 +46,7 @@ using std::min;
 using std::list;
 using std::map;
 using std::pair;
+using std::shared_ptr;
 using std::vector;
 
 using namespace pv::data::decode;
@@ -87,13 +87,13 @@ DecoderStack::~DecoderStack()
        }
 }
 
-const std::list< boost::shared_ptr<decode::Decoder> >&
+const std::list< std::shared_ptr<decode::Decoder> >&
 DecoderStack::stack() const
 {
        return _stack;
 }
 
-void DecoderStack::push(boost::shared_ptr<decode::Decoder> decoder)
+void DecoderStack::push(std::shared_ptr<decode::Decoder> decoder)
 {
        assert(decoder);
        _stack.push_back(decoder);
index 2eeaf1c76fa4c1cba4718c8e627c05e1bb0e7afa..1badc6b9b34988aafb41265b54d9b5681be64852 100644 (file)
@@ -24,9 +24,9 @@
 #include "signaldata.h"
 
 #include <list>
+#include <memory>
 
 #include <boost/optional.hpp>
-#include <boost/shared_ptr.hpp>
 #include <boost/thread.hpp>
 
 #include <QObject>
@@ -80,8 +80,8 @@ public:
 
        virtual ~DecoderStack();
 
-       const std::list< boost::shared_ptr<decode::Decoder> >& stack() const;
-       void push(boost::shared_ptr<decode::Decoder> decoder);
+       const std::list< std::shared_ptr<decode::Decoder> >& stack() const;
+       void push(std::shared_ptr<decode::Decoder> decoder);
        void remove(int index);
 
        int64_t samples_decoded() const;
@@ -136,9 +136,9 @@ private:
         */
        static boost::mutex _global_decode_mutex;
 
-       std::list< boost::shared_ptr<decode::Decoder> > _stack;
+       std::list< std::shared_ptr<decode::Decoder> > _stack;
 
-       boost::shared_ptr<pv::data::LogicSnapshot> _snapshot;
+       std::shared_ptr<pv::data::LogicSnapshot> _snapshot;
 
        mutable boost::mutex _input_mutex;
        mutable boost::condition_variable _input_cond;
index 9bcfd0a382ac39c020d396007d07a4e1885fbef8..2737bcb58238870b63066231778ca674c6231e25 100644 (file)
@@ -21,9 +21,9 @@
 #include "logic.h"
 #include "logicsnapshot.h"
 
-using boost::shared_ptr;
 using std::deque;
 using std::max;
+using std::shared_ptr;
 
 namespace pv {
 namespace data {
@@ -59,7 +59,7 @@ void Logic::clear()
 uint64_t Logic::get_max_sample_count() const
 {
        uint64_t l = 0;
-       for (boost::shared_ptr<LogicSnapshot> s : _snapshots) {
+       for (std::shared_ptr<LogicSnapshot> s : _snapshots) {
                assert(s);
                l = max(l, s->get_sample_count());
        }
index 3d8339421f18506d0882160fa8ab3e8639c20d57..607e0bd450d78f56c1462a2adf158105972657ce 100644 (file)
@@ -23,8 +23,8 @@
 
 #include "signaldata.h"
 
-#include <boost/shared_ptr.hpp>
 #include <deque>
+#include <memory>
 
 namespace pv {
 namespace data {
@@ -39,9 +39,9 @@ public:
        int get_num_probes() const;
 
        void push_snapshot(
-               boost::shared_ptr<LogicSnapshot> &snapshot);
+               std::shared_ptr<LogicSnapshot> &snapshot);
 
-       std::deque< boost::shared_ptr<LogicSnapshot> >&
+       std::deque< std::shared_ptr<LogicSnapshot> >&
                get_snapshots();
 
        void clear();
@@ -50,7 +50,7 @@ public:
 
 private:
        const unsigned int _num_probes;
-       std::deque< boost::shared_ptr<LogicSnapshot> > _snapshots;
+       std::deque< std::shared_ptr<LogicSnapshot> > _snapshots;
 };
 
 } // namespace data
index 4f9a7799539b5e125b01e0a1591ac8c165da7414..4a30e5fcd75c3bb12df003096888c6c16dd116aa 100644 (file)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include <cassert>
 #include <sstream>
 
 #include <libsigrok/libsigrok.h>
index e6a5140989dcea0a58ec8ace4a40bae4714eba3a..7f467cf442be629771fa776e327e2b9e9dab9f49 100644 (file)
 #ifndef PULSEVIEW_PV_DEVICE_DEVINST_H
 #define PULSEVIEW_PV_DEVICE_DEVINST_H
 
+#include <memory>
 #include <string>
 
-#include <boost/shared_ptr.hpp>
-
 #include <QObject>
 
 #include <glib.h>
index ffdeb670d7efea1d368cddce78cb79faaf882239..80345799e04d16631d87934ae8a0d3668d7bb4d5 100644 (file)
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include <cassert>
+
 #include "sessionfile.h"
 
 #include <libsigrok/libsigrok.h>
index 6b07b99111f86482bdaa45f0c883c955bc7fefcb..bbcfbf247675b345ab5af39376a930af132ca2e8 100644 (file)
 
 #include <libsigrok/libsigrok.h>
 
-using boost::shared_ptr;
 using std::list;
 using std::map;
 using std::ostringstream;
 using std::runtime_error;
+using std::shared_ptr;
 using std::string;
 
 namespace pv {
index acef8a42d93ba2b1f1d1f5475717ab3a97557079..ca86a7fe9c15c69f727ccbf3b04711a8650e8250 100644 (file)
 #include <glib.h>
 
 #include <list>
+#include <memory>
 #include <string>
 
-#include <boost/shared_ptr.hpp>
-
 struct sr_context;
 struct sr_dev_driver;
 
@@ -46,10 +45,10 @@ public:
 
        ~DeviceManager();
 
-       const std::list< boost::shared_ptr<pv::device::Device> >&
+       const std::list< std::shared_ptr<pv::device::Device> >&
                devices() const;
 
-       std::list< boost::shared_ptr<pv::device::Device> > driver_scan(
+       std::list< std::shared_ptr<pv::device::Device> > driver_scan(
                struct sr_dev_driver *const driver,
                GSList *const drvopts = NULL);
 
@@ -62,12 +61,12 @@ private:
 
        void release_driver(struct sr_dev_driver *const driver);
 
-       static bool compare_devices(boost::shared_ptr<device::Device> a,
-               boost::shared_ptr<device::Device> b);
+       static bool compare_devices(std::shared_ptr<device::Device> a,
+               std::shared_ptr<device::Device> b);
 
 private:
        struct sr_context *const _sr_ctx;
-       std::list< boost::shared_ptr<pv::device::Device> > _devices;
+       std::list< std::shared_ptr<pv::device::Device> > _devices;
 };
 
 } // namespace pv
index c5535d87fa3b53dcc2662e29f149eb64b8f6b6a0..d554b4c181fefc9b12f56ee214e5acc839777766 100644 (file)
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include <cassert>
+
 #include <libsigrok/libsigrok.h>
 
 #include "connect.h"
@@ -32,8 +34,8 @@ extern "C" {
 #include <libsigrok/libsigrok.h>
 }
 
-using boost::shared_ptr;
 using std::list;
+using std::shared_ptr;
 using std::string;
 
 extern sr_context *sr_ctx;
index 1de0ed8de9adaec3b68787c4261c1dc332d72fa0..a3f05ee1a6a224e1936843d11b2b30b508a50103 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef PULSEVIEW_PV_CONNECT_H
 #define PULSEVIEW_PV_CONNECT_H
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <QComboBox>
 #include <QDialog>
@@ -52,7 +52,7 @@ class Connect : public QDialog
 public:
        Connect(QWidget *parent, pv::DeviceManager &device_manager);
 
-       boost::shared_ptr<device::Device> get_selected_device() const;
+       std::shared_ptr<device::Device> get_selected_device() const;
 
 private:
        void populate_drivers();
@@ -83,7 +83,7 @@ private:
 
        QPushButton _scan_button;
        QListWidget _device_list;
-       std::map<const sr_dev_inst*, boost::shared_ptr<pv::device::Device> >
+       std::map<const sr_dev_inst*, std::shared_ptr<pv::device::Device> >
                _device_map;
 
        QDialogButtonBox _button_box;
index 61d08d515c049b8117b64467cce658857aefff2c..7d53832ab8cf6c2bbf189c646ff0c3e442fb48e5 100644 (file)
 #ifndef PULSEVIEW_PV_DIALOGS_SAVEPROGRESS_H
 #define PULSEVIEW_PV_DIALOGS_SAVEPROGRESS_H
 
+#include <memory>
 #include <set>
 
-#include <boost/shared_ptr.hpp>
-
 #include <QProgressDialog>
 
 #include <pv/storesession.h>
index 2689060347c19bb186f728fa5b9b16fd66b0fdd9..42f79bbc876757b3a56b2bd200d40789eac23305 100644 (file)
@@ -60,8 +60,8 @@
 #include <glib.h>
 #include <libsigrok/libsigrok.h>
 
-using boost::shared_ptr;
 using std::list;
+using std::shared_ptr;
 
 namespace pv {
 
index 1f9dd528af7a22d152adace7342cb827882197da..22df24cfe4278ce1c271accfbf80db97bda09f6a 100644 (file)
@@ -22,8 +22,7 @@
 #define PULSEVIEW_PV_MAINWINDOW_H
 
 #include <list>
-
-#include <boost/weak_ptr.hpp>
+#include <memory>
 
 #include <QMainWindow>
 
index 353dfcfedfe941df0ded87663eae7bf28bc2913d..eaa036c2e237c4a38b20460709e3ef0c2664e447 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <pv/prop/property.h>
 
-using boost::shared_ptr;
+using std::shared_ptr;
 
 namespace pv {
 namespace popups {
index 945959b24eb7372c52c41c0b904b3cf18d3b9497..deedf587854c5af7570643c1892af4d93a65bf80 100644 (file)
@@ -35,13 +35,13 @@ class DeviceOptions : public pv::widgets::Popup
        Q_OBJECT
 
 public:
-       DeviceOptions(boost::shared_ptr<device::DevInst> dev_inst,
+       DeviceOptions(std::shared_ptr<device::DevInst> dev_inst,
                QWidget *parent);
 
        pv::prop::binding::DeviceOptions& binding();
 
 private:
-       boost::shared_ptr<device::DevInst> _dev_inst;
+       std::shared_ptr<device::DevInst> _dev_inst;
 
        QVBoxLayout _layout;
 
index ada4d9a09ed64b58af4d0807d655975f5b9116fd..f8fa970e0e7a7accff89b2ff4440e8a19ae45df4 100644 (file)
@@ -34,9 +34,9 @@
 
 using namespace Qt;
 
-using boost::shared_ptr;
 using std::map;
 using std::set;
+using std::shared_ptr;
 using std::vector;
 
 using pv::view::Signal;
index dbf90cd0b34237a603d013fcdc1b6772ba7b84ab..4265c1597274eef0f27b35d4fe8a28fbf72abbdf 100644 (file)
 #define PULSEVIEW_PV_POPUPS_PROBES_H
 
 #include <map>
+#include <memory>
 #include <vector>
 
-#include <boost/shared_ptr.hpp>
-
 #include <QFormLayout>
 #include <QHBoxLayout>
 #include <QPushButton>
@@ -65,10 +64,10 @@ private:
        void set_all_probes(bool set);
 
        void populate_group(const sr_channel_group *group,
-               const std::vector< boost::shared_ptr<pv::view::Signal> > sigs);
+               const std::vector< std::shared_ptr<pv::view::Signal> > sigs);
 
        QGridLayout* create_channel_group_grid(
-               const std::vector< boost::shared_ptr<pv::view::Signal> > sigs);
+               const std::vector< std::shared_ptr<pv::view::Signal> > sigs);
 
 private:
        void showEvent(QShowEvent *e);
@@ -86,9 +85,9 @@ private:
 
        bool _updating_probes;
 
-       std::vector< boost::shared_ptr<pv::prop::binding::DeviceOptions> >
+       std::vector< std::shared_ptr<pv::prop::binding::DeviceOptions> >
                 _group_bindings;
-       std::map< QCheckBox*, boost::shared_ptr<pv::view::Signal> >
+       std::map< QCheckBox*, std::shared_ptr<pv::view::Signal> >
                _check_box_signal_map;
 
        QHBoxLayout _buttons_bar;
index 1a5eb5ec097a32994d04e3057db5090bd41aee77..6432d2935f71deb62120ed75babbfab1507a63ca 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include <cassert>
+
 #include <QFormLayout>
 
 #include <pv/prop/property.h>
 
 #include "binding.h"
 
-using boost::shared_ptr;
+using std::shared_ptr;
 
 namespace pv {
 namespace prop {
 namespace binding {
 
-const std::vector< boost::shared_ptr<Property> >& Binding::properties()
+const std::vector< std::shared_ptr<Property> >& Binding::properties()
 {
        return _properties;
 }
index 89c1acbc88628779ad4ddad0797aed5590745230..cce8ebf8a15cfe86d174aa5641fa9d514880bcea 100644 (file)
@@ -24,7 +24,7 @@
 #include <glib.h>
 
 #include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <QString>
 
@@ -41,7 +41,7 @@ namespace binding {
 class Binding
 {
 public:
-       const std::vector< boost::shared_ptr<Property> >& properties();
+       const std::vector< std::shared_ptr<Property> >& properties();
 
        void commit();
 
@@ -54,7 +54,7 @@ public:
        static QString print_gvariant(GVariant *const gvar);
 
 protected:
-       std::vector< boost::shared_ptr<Property> > _properties;
+       std::vector< std::shared_ptr<Property> > _properties;
 };
 
 } // binding
index 930e1f0aee14c77a860ca8242b729218fdc614be..0e44386eafa546781244af06bdfe33d004b4e770 100644 (file)
 
 using boost::bind;
 using boost::none;
-using boost::shared_ptr;
 using std::make_pair;
 using std::map;
 using std::pair;
+using std::shared_ptr;
 using std::string;
 using std::vector;
 
index 6dec9c2ec5bd9d4a2ba5938c7191d3b767dbe30d..a0b8dc4d3880b04495edcb2e8d6726cd17ba095b 100644 (file)
@@ -42,11 +42,11 @@ namespace binding {
 class DecoderOptions : public Binding
 {
 public:
-       DecoderOptions(boost::shared_ptr<pv::data::DecoderStack> decoder_stack,
-               boost::shared_ptr<pv::data::decode::Decoder> decoder);
+       DecoderOptions(std::shared_ptr<pv::data::DecoderStack> decoder_stack,
+               std::shared_ptr<pv::data::decode::Decoder> decoder);
 
 private:
-       static boost::shared_ptr<Property> bind_enum(const QString &name,
+       static std::shared_ptr<Property> bind_enum(const QString &name,
                const srd_decoder_option *option,
                Property::Getter getter, Property::Setter setter);
 
@@ -55,8 +55,8 @@ private:
        void setter(const char *id, GVariant *value);
 
 private:
-       boost::shared_ptr<pv::data::DecoderStack> _decoder_stack;
-       boost::shared_ptr<pv::data::decode::Decoder> _decoder;
+       std::shared_ptr<pv::data::DecoderStack> _decoder_stack;
+       std::shared_ptr<pv::data::decode::Decoder> _decoder;
 };
 
 } // binding
index 2dc237a885ec6eec83f9efbdde0654ef0aa9b049..a1ae6ba71e6fe50531b88286ef221320b6f054e1 100644 (file)
@@ -37,9 +37,9 @@
 using boost::bind;
 using boost::function;
 using boost::optional;
-using boost::shared_ptr;
 using std::make_pair;
 using std::pair;
+using std::shared_ptr;
 using std::string;
 using std::vector;
 
index 445361fd6f80467421d2e90c303719643862268f..f0ba92ef777ee85ec1f27bdc955f4624bcedd5bd 100644 (file)
@@ -45,7 +45,7 @@ namespace binding {
 class DeviceOptions : public Binding
 {
 public:
-       DeviceOptions(boost::shared_ptr<pv::device::DevInst> dev_inst,
+       DeviceOptions(std::shared_ptr<pv::device::DevInst> dev_inst,
                const sr_channel_group *group = NULL);
 
 private:
@@ -61,7 +61,7 @@ private:
        static QString print_voltage_threshold(GVariant *const gvar);
 
 protected:
-       boost::shared_ptr<device::DevInst> _dev_inst;
+       std::shared_ptr<device::DevInst> _dev_inst;
        const sr_channel_group *const _group;
 };
 
index 282b7ec5c691959f432fe2627a60b1eddde69754..1d13de2a7fad3f786cb7f0e8dce8e30c86138f4f 100644 (file)
 
 #include <QDebug>
 
-using boost::dynamic_pointer_cast;
 using boost::function;
 using boost::lock_guard;
 using boost::mutex;
-using boost::shared_ptr;
+using std::dynamic_pointer_cast;
 using std::list;
 using std::map;
 using std::set;
+using std::shared_ptr;
 using std::string;
 using std::vector;
 
index 1221750b0bc039c0b33e95b9026d6b1ac4427a2f..c7a81bfcd662de309ff9fa7dbbe65bec75fafafa 100644 (file)
 #define PULSEVIEW_PV_SIGSESSION_H
 
 #include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
 #include <boost/thread.hpp>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
@@ -76,12 +76,12 @@ public:
 
        ~SigSession();
 
-       boost::shared_ptr<device::DevInst> get_device() const;
+       std::shared_ptr<device::DevInst> get_device() const;
 
        /**
         * Sets device instance that will be used in the next capture session.
         */
-       void set_device(boost::shared_ptr<device::DevInst> dev_inst)
+       void set_device(std::shared_ptr<device::DevInst> dev_inst)
                throw(QString);
 
        void set_file(const std::string &name)
@@ -97,15 +97,15 @@ public:
 
        void stop_capture();
 
-       std::set< boost::shared_ptr<data::SignalData> > get_data() const;
+       std::set< std::shared_ptr<data::SignalData> > get_data() const;
 
-       std::vector< boost::shared_ptr<view::Signal> >
+       std::vector< std::shared_ptr<view::Signal> >
                get_signals() const;
 
 #ifdef ENABLE_DECODE
        bool add_decoder(srd_decoder *const dec);
 
-       std::vector< boost::shared_ptr<view::DecodeTrace> >
+       std::vector< std::shared_ptr<view::DecodeTrace> >
                get_decode_signals() const;
 
        void remove_decode_signal(view::DecodeTrace *signal);
@@ -114,9 +114,9 @@ public:
 private:
        void set_capture_state(capture_state state);
 
-       void update_signals(boost::shared_ptr<device::DevInst> dev_inst);
+       void update_signals(std::shared_ptr<device::DevInst> dev_inst);
 
-       boost::shared_ptr<view::Signal> signal_from_probe(
+       std::shared_ptr<view::Signal> signal_from_probe(
                const sr_channel *probe) const;
 
        void read_sample_rate(const sr_dev_inst *const sdi);
@@ -137,7 +137,7 @@ private:
                boost::function<void (const QString)> error_handler,
                sr_input_format *format = NULL);
 
-       void sample_thread_proc(boost::shared_ptr<device::DevInst> dev_inst,
+       void sample_thread_proc(std::shared_ptr<device::DevInst> dev_inst,
                boost::function<void (const QString)> error_handler);
 
        void feed_in_header(const sr_dev_inst *sdi);
@@ -163,20 +163,20 @@ private:
        /**
         * The device instance that will be used in the next capture session.
         */
-       boost::shared_ptr<device::DevInst> _dev_inst;
+       std::shared_ptr<device::DevInst> _dev_inst;
 
-       std::vector< boost::shared_ptr<view::DecodeTrace> > _decode_traces;
+       std::vector< std::shared_ptr<view::DecodeTrace> > _decode_traces;
 
        mutable boost::mutex _sampling_mutex;
        capture_state _capture_state;
 
        mutable boost::mutex _signals_mutex;
-       std::vector< boost::shared_ptr<view::Signal> > _signals;
+       std::vector< std::shared_ptr<view::Signal> > _signals;
 
        mutable boost::mutex _data_mutex;
-       boost::shared_ptr<data::Logic> _logic_data;
-       boost::shared_ptr<data::LogicSnapshot> _cur_logic_snapshot;
-       std::map< const sr_channel*, boost::shared_ptr<data::AnalogSnapshot> >
+       std::shared_ptr<data::Logic> _logic_data;
+       std::shared_ptr<data::LogicSnapshot> _cur_logic_snapshot;
+       std::map< const sr_channel*, std::shared_ptr<data::AnalogSnapshot> >
                _cur_analog_snapshots;
 
        boost::thread _sampling_thread;
index 3d0f12fe7cb66b79027125bbc4a3363fdbeadc91..f60cd26cc621ec9225e16ef57ed37ad2113e80d9 100644 (file)
 #include <pv/data/logicsnapshot.h>
 #include <pv/view/signal.h>
 
-using boost::dynamic_pointer_cast;
 using boost::mutex;
-using boost::shared_ptr;
 using boost::thread;
 using boost::lock_guard;
 using std::deque;
+using std::dynamic_pointer_cast;
 using std::make_pair;
 using std::min;
 using std::pair;
 using std::set;
+using std::shared_ptr;
 using std::string;
 using std::vector;
 
index 5ef92a33f49d9df39b88bf66d20d9c92a3e9f4f0..e543df13051eae592a8617a36e93e79f9b2763bc 100644 (file)
@@ -61,7 +61,7 @@ public:
        void cancel();
 
 private:
-       void store_proc(boost::shared_ptr<pv::data::LogicSnapshot> snapshot);
+       void store_proc(std::shared_ptr<pv::data::LogicSnapshot> snapshot);
 
 signals:
        void progress_updated();
index 367b9b2e6fe4b12ac2d9481af81a7eaa8fc09eef..af5afb0c27774b980ae843c68e73a81b6e135217 100644 (file)
 #include <pv/popups/probes.h>
 #include <pv/util.h>
 
-using boost::shared_ptr;
 using std::map;
 using std::max;
 using std::min;
+using std::shared_ptr;
 using std::string;
 
 namespace pv {
index e2e24b788145bb3ca227b8931e6b13af934a7761..2c2431c427a71ccb0fa3ff166b38503737d8edb9 100644 (file)
@@ -25,8 +25,7 @@
 
 #include <list>
 #include <map>
-
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <QComboBox>
 #include <QDoubleSpinBox>
@@ -62,11 +61,11 @@ public:
        SamplingBar(SigSession &session, QWidget *parent);
 
        void set_device_list(
-               const std::list< boost::shared_ptr<pv::device::DevInst> >
+               const std::list< std::shared_ptr<pv::device::DevInst> >
                        &devices,
-               boost::shared_ptr<pv::device::DevInst> selected);
+               std::shared_ptr<pv::device::DevInst> selected);
 
-       boost::shared_ptr<pv::device::DevInst> get_selected_device() const;
+       std::shared_ptr<pv::device::DevInst> get_selected_device() const;
 
        void set_capture_state(pv::SigSession::capture_state state);
 
@@ -96,7 +95,7 @@ private:
        SigSession &_session;
 
        QComboBox _device_selector;
-       std::map<const sr_dev_inst*, boost::weak_ptr<device::DevInst> >
+       std::map<const sr_dev_inst*, std::weak_ptr<device::DevInst> >
                _device_selector_map;
        bool _updating_device_selector;
 
index c3f273839adccbed51b4e2a3abc03a2d8ce9959a..156af1003a4440ed527516123f22352aa9768029 100644 (file)
@@ -27,9 +27,9 @@
 #include "pv/data/analogsnapshot.h"
 #include "pv/view/view.h"
 
-using boost::shared_ptr;
 using std::max;
 using std::min;
+using std::shared_ptr;
 using std::deque;
 
 namespace pv {
index f22d128bc01494c0f2188cbcb963d431cd6c3ac4..6f0e49d7409095eb8d381bb5afab941313fec1f5 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "signal.h"
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 namespace pv {
 
@@ -42,15 +42,15 @@ private:
        static const float EnvelopeThreshold;
 
 public:
-       AnalogSignal(boost::shared_ptr<pv::device::DevInst> dev_inst,
+       AnalogSignal(std::shared_ptr<pv::device::DevInst> dev_inst,
                const sr_channel *const probe,
-               boost::shared_ptr<pv::data::Analog> data);
+               std::shared_ptr<pv::data::Analog> data);
 
        virtual ~AnalogSignal();
 
-       boost::shared_ptr<pv::data::SignalData> data() const;
+       std::shared_ptr<pv::data::SignalData> data() const;
 
-       boost::shared_ptr<pv::data::Analog> analog_data() const;
+       std::shared_ptr<pv::data::Analog> analog_data() const;
 
        void set_scale(float scale);
 
@@ -72,17 +72,17 @@ public:
 
 private:
        void paint_trace(QPainter &p,
-               const boost::shared_ptr<pv::data::AnalogSnapshot> &snapshot,
+               const std::shared_ptr<pv::data::AnalogSnapshot> &snapshot,
                int y, int left, const int64_t start, const int64_t end,
                const double pixels_offset, const double samples_per_pixel);
 
        void paint_envelope(QPainter &p,
-               const boost::shared_ptr<pv::data::AnalogSnapshot> &snapshot,
+               const std::shared_ptr<pv::data::AnalogSnapshot> &snapshot,
                int y, int left, const int64_t start, const int64_t end,
                const double pixels_offset, const double samples_per_pixel);
 
 private:
-       boost::shared_ptr<pv::data::Analog> _data;
+       std::shared_ptr<pv::data::Analog> _data;
        float _scale;
 };
 
index 95134b775a1d3daaeaa13f3ff3ce0f51fe245441..98b7289f11f0babd8c1bf73b33959d89ba0f1031 100644 (file)
 #include <QRect>
 #include <QRectF>
 
-#include <stdio.h>
+#include <cassert>
+#include <cstdio>
 
 #include <extdef.h>
 
-using boost::shared_ptr;
+using std::shared_ptr;
 
 namespace pv {
 namespace view {
index 290365e8ff3e28f9a5ee9b00f4237d8785b29130..16e8298b8df4a8a0c98ad038dd78a90cb37043f7 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "timemarker.h"
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <QSizeF>
 
@@ -74,7 +74,7 @@ public:
 private:
        void compute_text_size(QPainter &p, unsigned int prefix);
 
-       boost::shared_ptr<Cursor> get_other_cursor() const;
+       std::shared_ptr<Cursor> get_other_cursor() const;
 
 private:
        QSizeF _text_size;
index f73567e3bf750e08e384c2864ee9fadf0db2ad13..d319a7b1bffc3b69e67e937c46a3b0a38aee1747 100644 (file)
 #include "view.h"
 #include "pv/util.h"
 
+#include <cassert>
 #include <algorithm>
 
-using boost::shared_ptr;
 using std::max;
 using std::make_pair;
 using std::min;
+using std::shared_ptr;
 using std::pair;
 
 namespace pv {
index 815276e24c0ca997faf2af5e780da632cb6108eb..6c56dcd71dc89499dc8a5eceecd6593f43be1a85 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "cursor.h"
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <QPainter>
 
@@ -47,12 +47,12 @@ public:
        /**
         * Returns a pointer to the first cursor.
         */
-       boost::shared_ptr<Cursor> first() const;
+       std::shared_ptr<Cursor> first() const;
 
        /**
         * Returns a pointer to the second cursor.
         */
-       boost::shared_ptr<Cursor> second() const;
+       std::shared_ptr<Cursor> second() const;
 
 public:
        QRectF get_label_rect(const QRect &rect) const;
@@ -69,7 +69,7 @@ public:
        std::pair<float, float> get_cursor_offsets() const;
 
 private:
-       boost::shared_ptr<Cursor> _first, _second;
+       std::shared_ptr<Cursor> _first, _second;
        const View &_view;
 
        QSizeF _text_size;
index e2c211840dd6e24a715198ff9341a9341e4bdff2..53eb22f1adfe4f2ff0d542d8aec2f394dc8031a1 100644 (file)
@@ -47,12 +47,12 @@ extern "C" {
 #include <pv/widgets/decodergroupbox.h>
 #include <pv/widgets/decodermenu.h>
 
-using boost::dynamic_pointer_cast;
-using boost::shared_ptr;
+using std::dynamic_pointer_cast;
 using std::list;
 using std::max;
 using std::map;
 using std::min;
+using std::shared_ptr;
 using std::vector;
 
 namespace pv {
@@ -111,7 +111,7 @@ const QColor DecodeTrace::OutlineColours[16] = {
 };
 
 DecodeTrace::DecodeTrace(pv::SigSession &session,
-       boost::shared_ptr<pv::data::DecoderStack> decoder_stack, int index) :
+       std::shared_ptr<pv::data::DecoderStack> decoder_stack, int index) :
        Trace(QString::fromUtf8(
                decoder_stack->stack().front()->decoder()->name)),
        _session(session),
@@ -136,7 +136,7 @@ bool DecodeTrace::enabled() const
        return true;
 }
 
-const boost::shared_ptr<pv::data::DecoderStack>& DecodeTrace::decoder() const
+const std::shared_ptr<pv::data::DecoderStack>& DecodeTrace::decoder() const
 {
        return _decoder_stack;
 }
index 9a991fcb436c63596fb3c2d3cedd9fff4b7a3aa3..b2ff2b59518411192007a021ff9990971348f3bf 100644 (file)
 
 #include <list>
 #include <map>
+#include <memory>
 
 #include <QSignalMapper>
 
-#include <boost/shared_ptr.hpp>
-
 #include <pv/prop/binding/decoderoptions.h>
 
 struct srd_channel;
@@ -65,7 +64,7 @@ private:
        struct ProbeSelector
        {
                const QComboBox *_combo;
-               const boost::shared_ptr<pv::data::decode::Decoder> _decoder;
+               const std::shared_ptr<pv::data::decode::Decoder> _decoder;
                const srd_channel *_pdch;
        };
 
@@ -83,12 +82,12 @@ private:
 
 public:
        DecodeTrace(pv::SigSession &session,
-               boost::shared_ptr<pv::data::DecoderStack> decoder_stack,
+               std::shared_ptr<pv::data::DecoderStack> decoder_stack,
                int index);
 
        bool enabled() const;
 
-       const boost::shared_ptr<pv::data::DecoderStack>& decoder() const;
+       const std::shared_ptr<pv::data::DecoderStack>& decoder() const;
 
        void set_view(pv::view::View *view);
 
@@ -143,15 +142,15 @@ private:
                int right, double samples_per_pixel, double pixels_offset);
 
        void create_decoder_form(int index,
-               boost::shared_ptr<pv::data::decode::Decoder> &dec,
+               std::shared_ptr<pv::data::decode::Decoder> &dec,
                QWidget *parent, QFormLayout *form);
 
        QComboBox* create_probe_selector(QWidget *parent,
-               const boost::shared_ptr<pv::data::decode::Decoder> &dec,
+               const std::shared_ptr<pv::data::decode::Decoder> &dec,
                const srd_channel *const pdch);
 
        void commit_decoder_probes(
-               boost::shared_ptr<data::decode::Decoder> &dec);
+               std::shared_ptr<data::decode::Decoder> &dec);
 
        void commit_probes();
 
@@ -170,11 +169,11 @@ private slots:
 
 private:
        pv::SigSession &_session;
-       boost::shared_ptr<pv::data::DecoderStack> _decoder_stack;
+       std::shared_ptr<pv::data::DecoderStack> _decoder_stack;
 
        uint64_t _decode_start, _decode_end;
 
-       std::list< boost::shared_ptr<pv::prop::binding::DecoderOptions> >
+       std::list< std::shared_ptr<pv::prop::binding::DecoderOptions> >
                _bindings;
 
        std::list<ProbeSelector> _probe_selectors;
index 7c68f302846b5b4f6d41b020abdef6c15f98df69..87effd3d6b95e0ffba01ebb2c71fb7b9b6c972b6 100644 (file)
 
 #include <pv/widgets/popup.h>
 
-using boost::shared_ptr;
 using std::max;
 using std::make_pair;
 using std::pair;
+using std::shared_ptr;
 using std::vector;
 
 namespace pv {
@@ -222,7 +222,7 @@ void Header::mouseMoveEvent(QMouseEvent *event)
                const int delta = event->pos().y() - _mouse_down_point.y();
 
                for (auto i = _drag_traces.begin(); i != _drag_traces.end(); i++) {
-                       const boost::shared_ptr<Trace> trace((*i).first);
+                       const std::shared_ptr<Trace> trace((*i).first);
                        if (trace) {
                                const int y = (*i).second + delta;
                                const int y_snap =
index 489a5caaff996cf87d308f0e7a74572f789aac37..641f203bb9325745d9abdf5b3849424ef642a6c4 100644 (file)
 #ifndef PULSEVIEW_PV_VIEW_HEADER_H
 #define PULSEVIEW_PV_VIEW_HEADER_H
 
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
 #include <list>
+#include <memory>
 #include <utility>
 
 #include "marginwidget.h"
@@ -48,7 +46,7 @@ public:
        QSize sizeHint() const;
 
 private:
-       boost::shared_ptr<pv::view::Trace> get_mouse_over_trace(
+       std::shared_ptr<pv::view::Trace> get_mouse_over_trace(
                const QPoint &pt);
 
        void clear_selection();
@@ -84,7 +82,7 @@ private:
        QPoint _mouse_down_point;
        bool _dragging;
 
-       std::list<std::pair<boost::weak_ptr<Trace>, int> >
+       std::list<std::pair<std::weak_ptr<Trace>, int> >
                _drag_traces;
 };
 
index 546743e337bd62caae00f836a31c09b0630f664d..8363383ac2125bfae2b04c21fa30d5749f87b147 100644 (file)
 #include <pv/data/logicsnapshot.h>
 #include <pv/view/view.h>
 
-using boost::shared_ptr;
 using std::deque;
 using std::max;
 using std::min;
 using std::pair;
+using std::shared_ptr;
 using std::vector;
 
 namespace pv {
index c3e1666184912ae8f92b1a8ca9fcc3bc9f0938c8..34a307c919dca35ef7bccd35761ac4003cbf5169 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "signal.h"
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class QToolBar;
 
@@ -49,15 +49,15 @@ private:
        static const QColor SignalColours[10];
 
 public:
-       LogicSignal(boost::shared_ptr<pv::device::DevInst> dev_inst,
+       LogicSignal(std::shared_ptr<pv::device::DevInst> dev_inst,
                const sr_channel *const probe,
-               boost::shared_ptr<pv::data::Logic> data);
+               std::shared_ptr<pv::data::Logic> data);
 
        virtual ~LogicSignal();
 
-       boost::shared_ptr<pv::data::SignalData> data() const;
+       std::shared_ptr<pv::data::SignalData> data() const;
 
-       boost::shared_ptr<pv::data::Logic> logic_data() const;
+       std::shared_ptr<pv::data::Logic> logic_data() const;
 
        /**
         * Paints the background layer of the signal with a QPainter
@@ -102,7 +102,7 @@ private slots:
        void on_trigger_change();
 
 private:
-       boost::shared_ptr<pv::data::Logic> _data;
+       std::shared_ptr<pv::data::Logic> _data;
 
        QToolBar *_trigger_bar;
        QAction *_trigger_none;
index 9e29ec294b76786ed3e3e22b7a824be056c71720..934b0a67edc0e5f6a974cd6ad81e64d141d1d910 100644 (file)
@@ -35,7 +35,7 @@
 #include <pv/widgets/popup.h>
 
 using namespace Qt;
-using boost::shared_ptr;
+using std::shared_ptr;
 
 namespace pv {
 namespace view {
index c48f25a0bb8a826dbcd8f4234ce805a001115845..e7575db1d534fe8a37af3cde9f8f4f08ddef019b 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef PULSEVIEW_PV_VIEW_RULER_H
 #define PULSEVIEW_PV_VIEW_RULER_H
 
-#include <boost/weak_ptr.hpp>
+#include <memory>
 
 #include "marginwidget.h"
 
@@ -67,7 +67,7 @@ private slots:
        void hover_point_changed();
 
 private:
-       boost::weak_ptr<TimeMarker> _grabbed_marker;
+       std::weak_ptr<TimeMarker> _grabbed_marker;
        QPoint _mouse_down_point;
        bool _dragging;
 };
index 3312c5924576b9517c5aa6425de4f935cbf95e63..48b400d1081d843bff33859ae0b5c6570adecd3c 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <pv/device/devinst.h>
 
-using boost::shared_ptr;
+using std::shared_ptr;
 
 namespace pv {
 namespace view {
index 32d181772fce2ce2c48e571d50573608e7d6018f..99b685c0bdc286f4f4f50e1b08290a8123e57acc 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef PULSEVIEW_PV_VIEW_SIGNAL_H
 #define PULSEVIEW_PV_VIEW_SIGNAL_H
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include <QComboBox>
 #include <QWidgetAction>
@@ -49,7 +49,7 @@ class Signal : public Trace
        Q_OBJECT
 
 protected:
-       Signal(boost::shared_ptr<pv::device::DevInst> dev_inst,
+       Signal(std::shared_ptr<pv::device::DevInst> dev_inst,
                const sr_channel *const probe);
 
 public:
@@ -58,7 +58,7 @@ public:
         */
        void set_name(QString name);
 
-       virtual boost::shared_ptr<pv::data::SignalData> data() const = 0;
+       virtual std::shared_ptr<pv::data::SignalData> data() const = 0;
 
        /**
         * Returns true if the trace is visible and enabled.
@@ -79,7 +79,7 @@ private slots:
        void on_disable();
 
 protected:
-       boost::shared_ptr<pv::device::DevInst> _dev_inst;
+       std::shared_ptr<pv::device::DevInst> _dev_inst;
        const sr_channel *const _probe;
 
        QComboBox *_name_widget;
index 0ebfea1e6d532b94c959569aaf5f1e9d03e601d4..d33d4ec95065a7eaae9ea2570d5eff5f3795c876 100644 (file)
@@ -41,8 +41,6 @@
 #include "pv/data/logic.h"
 #include "pv/data/logicsnapshot.h"
 
-using boost::shared_ptr;
-using boost::weak_ptr;
 using pv::data::SignalData;
 using std::deque;
 using std::list;
@@ -51,7 +49,9 @@ using std::make_pair;
 using std::min;
 using std::pair;
 using std::set;
+using std::shared_ptr;
 using std::vector;
+using std::weak_ptr;
 
 namespace pv {
 namespace view {
index 06616376c96045447dcd81af766bf236f1d1e0a0..83a6fe2d2a4d318288f084920e07f5c3c963e25a 100644 (file)
 
 #include <stdint.h>
 
+#include <memory>
 #include <set>
 #include <vector>
 
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-
 #include <QAbstractScrollArea>
 #include <QSizeF>
 
@@ -97,11 +95,11 @@ public:
         */
        void set_scale_offset(double scale, double offset);
 
-       std::vector< boost::shared_ptr<Trace> > get_traces() const;
+       std::vector< std::shared_ptr<Trace> > get_traces() const;
 
-       std::list<boost::weak_ptr<SelectableItem> > selected_items() const;
+       std::list<std::weak_ptr<SelectableItem> > selected_items() const;
 
-       std::set< boost::shared_ptr<pv::data::SignalData> >
+       std::set< std::shared_ptr<pv::data::SignalData> >
                get_visible_data() const;
 
        std::pair<double, double> get_time_extents() const;
@@ -162,8 +160,8 @@ private:
        void update_layout();
 
        static bool compare_trace_v_offsets(
-               const boost::shared_ptr<pv::view::Trace> &a,
-               const boost::shared_ptr<pv::view::Trace> &b);
+               const std::shared_ptr<pv::view::Trace> &a,
+               const std::shared_ptr<pv::view::Trace> &b);
 
 private:
        bool eventFilter(QObject *object, QEvent *event);
index cdae779e5dc0dfeec7a39d9fe3ecc2758bb98fed..f8d568109f3c198f78e145ba0bdc25be041779b7 100644 (file)
@@ -26,9 +26,9 @@
 
 #include <QMouseEvent>
 
-using boost::shared_ptr;
 using std::max;
 using std::min;
+using std::shared_ptr;
 using std::vector;
 
 namespace pv {
index d6e4f75a8a898dbbf3aea473690dcffdbbdbfb71..0fc0da392249b33179e6e6202e0f655f53d57032 100644 (file)
 #include "../../pv/sigsession.h"
 #include "../../pv/view/decodetrace.h"
 
-using boost::shared_ptr;
 using pv::data::DecoderStack;
 using pv::data::decode::Decoder;
 using pv::view::DecodeTrace;
+using std::shared_ptr;
 using std::vector;
 
 BOOST_AUTO_TEST_SUITE(DecoderStackTest)