projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ff83d98
)
Remove DecodeStack dependency from decode binding wrapper
author
Soeren Apel
<soeren@apelpie.net>
Thu, 13 Apr 2017 16:02:20 +0000
(18:02 +0200)
committer
Soeren Apel
<soeren@apelpie.net>
Tue, 4 Jul 2017 21:14:36 +0000
(23:14 +0200)
pv/binding/decoder.cpp
patch
|
blob
|
history
pv/binding/decoder.hpp
patch
|
blob
|
history
pv/data/decodesignal.cpp
patch
|
blob
|
history
pv/data/decodesignal.hpp
patch
|
blob
|
history
pv/views/trace/decodetrace.cpp
patch
|
blob
|
history
diff --git
a/pv/binding/decoder.cpp
b/pv/binding/decoder.cpp
index f2e2e1d579f46eabe7b67104de3a103a6647055a..28f42a08b38027ca87a9e42a5c6bec84e31c7a09 100644
(file)
--- a/
pv/binding/decoder.cpp
+++ b/
pv/binding/decoder.cpp
@@
-24,7
+24,7
@@
#include <boost/none_t.hpp>
#include <pv/data/decode/decoder.hpp>
#include <boost/none_t.hpp>
#include <pv/data/decode/decoder.hpp>
-#include <pv/data/decode
rstack
.hpp>
+#include <pv/data/decode
signal
.hpp>
#include <pv/prop/double.hpp>
#include <pv/prop/enum.hpp>
#include <pv/prop/int.hpp>
#include <pv/prop/double.hpp>
#include <pv/prop/enum.hpp>
#include <pv/prop/int.hpp>
@@
-48,9
+48,9
@@
namespace pv {
namespace binding {
Decoder::Decoder(
namespace binding {
Decoder::Decoder(
- shared_ptr<pv::data::Decode
rStack> decoder_stack
,
+ shared_ptr<pv::data::Decode
Signal> decode_signal
,
shared_ptr<data::decode::Decoder> decoder) :
shared_ptr<data::decode::Decoder> decoder) :
- decode
r_stack_(decoder_stack
),
+ decode
_signal_(decode_signal
),
decoder_(decoder)
{
assert(decoder_);
decoder_(decoder)
{
assert(decoder_);
@@
-137,8
+137,8
@@
void Decoder::setter(const char *id, Glib::VariantBase value)
assert(decoder_);
decoder_->set_option(id, value.gobj());
assert(decoder_);
decoder_->set_option(id, value.gobj());
- assert(decode
r_stack
_);
- decode
r_stack
_->begin_decode();
+ assert(decode
_signal
_);
+ decode
_signal
_->begin_decode();
}
} // namespace binding
}
} // namespace binding
diff --git
a/pv/binding/decoder.hpp
b/pv/binding/decoder.hpp
index bf670403dee317f486c5d43ab093eb74932288fa..a93a057f1a371b8571f19b0cd2808aa11e217b9e 100644
(file)
--- a/
pv/binding/decoder.hpp
+++ b/
pv/binding/decoder.hpp
@@
-31,7
+31,7
@@
struct srd_decoder_option;
namespace pv {
namespace data {
namespace pv {
namespace data {
-class Decode
rStack
;
+class Decode
Signal
;
namespace decode {
class Decoder;
}
namespace decode {
class Decoder;
}
@@
-42,7
+42,7
@@
namespace binding {
class Decoder : public Binding
{
public:
class Decoder : public Binding
{
public:
- Decoder(shared_ptr<pv::data::Decode
rStack> decoder_stack
,
+ Decoder(shared_ptr<pv::data::Decode
Signal> decode_signal
,
shared_ptr<pv::data::decode::Decoder> decoder);
private:
shared_ptr<pv::data::decode::Decoder> decoder);
private:
@@
-55,7
+55,7
@@
private:
void setter(const char *id, Glib::VariantBase value);
private:
void setter(const char *id, Glib::VariantBase value);
private:
- shared_ptr<pv::data::Decode
rStack> decoder_stack
_;
+ shared_ptr<pv::data::Decode
Signal> decode_signal
_;
shared_ptr<pv::data::decode::Decoder> decoder_;
};
shared_ptr<pv::data::decode::Decoder> decoder_;
};
diff --git
a/pv/data/decodesignal.cpp
b/pv/data/decodesignal.cpp
index 7a4a3d11269d0b22b397099cbf23a563133829cc..a557e1c16ebd601f8d2c65bd189ab544e0250faa 100644
(file)
--- a/
pv/data/decodesignal.cpp
+++ b/
pv/data/decodesignal.cpp
@@
-110,6
+110,11
@@
bool DecodeSignal::toggle_decoder_visibility(int index)
return state;
}
return state;
}
+void DecodeSignal::begin_decode()
+{
+ decoder_stack_->begin_decode();
+}
+
QString DecodeSignal::error_message() const
{
return decoder_stack_->error_message();
QString DecodeSignal::error_message() const
{
return decoder_stack_->error_message();
diff --git
a/pv/data/decodesignal.hpp
b/pv/data/decodesignal.hpp
index 2f7c273e978bfa2ec09618d89ddb1d273c1be676..cdd061a9769a45484170bd8e69b82a1b131443b7 100644
(file)
--- a/
pv/data/decodesignal.hpp
+++ b/
pv/data/decodesignal.hpp
@@
-28,6
+28,7
@@
#include <libsigrokdecode/libsigrokdecode.h>
#include <pv/data/signalbase.hpp>
#include <libsigrokdecode/libsigrokdecode.h>
#include <pv/data/signalbase.hpp>
+#include <pv/util.hpp>
using std::list;
using std::unordered_set;
using std::list;
using std::unordered_set;
@@
-76,6
+77,7
@@
public:
void remove_decoder(int index);
bool toggle_decoder_visibility(int index);
void remove_decoder(int index);
bool toggle_decoder_visibility(int index);
+ void begin_decode();
QString error_message() const;
const list<data::DecodeChannel> get_channels() const;
QString error_message() const;
const list<data::DecodeChannel> get_channels() const;
diff --git
a/pv/views/trace/decodetrace.cpp
b/pv/views/trace/decodetrace.cpp
index a4628eab9fbfdac55c9125e765f5c6cc0976ebcd..ee9b0ee211472c47347deb84d7b01241db0a056d 100644
(file)
--- a/
pv/views/trace/decodetrace.cpp
+++ b/
pv/views/trace/decodetrace.cpp
@@
-807,11
+807,9
@@
void DecodeTrace::create_decoder_form(int index,
.arg(ch.name, ch.desc, required_flag), hlayout);
}
.arg(ch.name, ch.desc, required_flag), hlayout);
}
- shared_ptr<pv::data::DecoderStack> decoder_stack = base_->decoder_stack();
-
// Add the options
shared_ptr<binding::Decoder> binding(
// Add the options
shared_ptr<binding::Decoder> binding(
- new binding::Decoder(decode
r_stack
, dec));
+ new binding::Decoder(decode
_signal_
, dec));
binding->add_properties_to_form(decoder_form, true);
bindings_.push_back(binding);
binding->add_properties_to_form(decoder_form, true);
bindings_.push_back(binding);