]> sigrok.org Git - pulseview.git/commitdiff
Renamed pv::data::Analog::get_snapshots and Logic::get_snapshots
authorJoel Holdsworth <redacted>
Sat, 29 Nov 2014 18:23:57 +0000 (18:23 +0000)
committerJoel Holdsworth <redacted>
Tue, 9 Dec 2014 18:24:59 +0000 (18:24 +0000)
pv/data/analog.cpp
pv/data/analog.hpp
pv/data/decoderstack.cpp
pv/data/logic.cpp
pv/data/logic.hpp
pv/storesession.cpp
pv/view/analogsignal.cpp
pv/view/decodetrace.cpp
pv/view/logicsignal.cpp

index 30cf5013033dd0f9cc8b002031769b109495c4b5..dba99253eeb7a77f559f537cf7cf03b652adcbab 100644 (file)
@@ -40,7 +40,7 @@ void Analog::push_snapshot(shared_ptr<AnalogSnapshot> &snapshot)
        snapshots_.push_front(snapshot);
 }
 
-deque< shared_ptr<AnalogSnapshot> >& Analog::get_snapshots()
+const deque< shared_ptr<AnalogSnapshot> >& Analog::analog_snapshots() const
 {
        return snapshots_;
 }
index cfc964e1872c2cd1ac0b33a66d9e9617b8a77566..c0c6bd6f07d82ca2b20ddb7db2e15b83c2110b62 100644 (file)
@@ -39,8 +39,8 @@ public:
        void push_snapshot(
                std::shared_ptr<AnalogSnapshot> &snapshot);
 
-       std::deque< std::shared_ptr<AnalogSnapshot> >&
-               get_snapshots();
+       const std::deque< std::shared_ptr<AnalogSnapshot> >&
+               analog_snapshots() const;
 
        void clear();
 
index c179b24a85701f548468ae244019444700af21e8..e0b16573430d8ef466309363af9e7b29ba9a8d1a 100644 (file)
@@ -245,7 +245,7 @@ void DecoderStack::begin_decode()
 
        // Check we have a snapshot of data
        const deque< shared_ptr<pv::data::LogicSnapshot> > &snapshots =
-               data->get_snapshots();
+               data->logic_snapshots();
        if (snapshots.empty())
                return;
        snapshot_ = snapshots.front();
index 8f1d294d5c7e9c27f10de34e960d1c9ee6f5570f..8b864f7672fb352f65a8cf1ffd59693f4cf210cf 100644 (file)
@@ -48,7 +48,7 @@ void Logic::push_snapshot(
        snapshots_.push_front(snapshot);
 }
 
-deque< shared_ptr<LogicSnapshot> >& Logic::get_snapshots()
+const deque< shared_ptr<LogicSnapshot> >& Logic::logic_snapshots() const
 {
        return snapshots_;
 }
index 51e12cb984db45675ac8a47886d771ebe8f538ed..a51850719bbeba7e8c1355860a162bedce2acc8f 100644 (file)
@@ -41,8 +41,8 @@ public:
        void push_snapshot(
                std::shared_ptr<LogicSnapshot> &snapshot);
 
-       std::deque< std::shared_ptr<LogicSnapshot> >&
-               get_snapshots();
+       const std::deque< std::shared_ptr<LogicSnapshot> >&
+               logic_snapshots() const;
 
        void clear();
 
index 2e90871cbcd3a6bda936e6efb863df1a21135c20..46dddcd64411fb85ac998c19d6b493977c52df5d 100644 (file)
@@ -108,7 +108,7 @@ bool StoreSession::start()
 
        // Get the snapshot
        const deque< shared_ptr<data::LogicSnapshot> > &snapshots =
-               data->get_snapshots();
+               data->logic_snapshots();
 
        if (snapshots.empty()) {
                error_ = tr("No snapshots to save.");
index 5d838506cedb1877ccf3b284b92735ba2cf0025f..c4d31cb6c689995ca5cd0085006f1cabbca31cbb 100644 (file)
@@ -104,7 +104,7 @@ void AnalogSignal::paint_mid(QPainter &p, const RowItemPaintParams &pp)
                return;
 
        const deque< shared_ptr<pv::data::AnalogSnapshot> > &snapshots =
-               data_->get_snapshots();
+               data_->analog_snapshots();
        if (snapshots.empty())
                return;
 
index 0b4cd7c599962ab5cd5399554c2326cfee077665..6f14732d2bddc56a9b71ed6bf24af6cd15447d79 100644 (file)
@@ -481,11 +481,11 @@ void DecodeTrace::draw_unresolved_period(QPainter &p, int h, int left,
                        ((data = logic_signal->logic_data())))
                        break;
 
-       if (!data || data->get_snapshots().empty())
+       if (!data || data->logic_snapshots().empty())
                return;
 
        const shared_ptr<LogicSnapshot> snapshot =
-               data->get_snapshots().front();
+               data->logic_snapshots().front();
        assert(snapshot);
        const int64_t sample_count = (int64_t)snapshot->get_sample_count();
        if (sample_count == 0)
index 3acf1b5cb03ebf53c8a632075a07f32adfa0f7f3..79f8457a7f9cc82046620f51ae9cb676b266f953 100644 (file)
@@ -170,7 +170,7 @@ void LogicSignal::paint_mid(QPainter &p, const RowItemPaintParams &pp)
        const float low_offset = y + 0.5f;
 
        const deque< shared_ptr<pv::data::LogicSnapshot> > &snapshots =
-               data_->get_snapshots();
+               data_->logic_snapshots();
        if (snapshots.empty())
                return;