]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decoderstack.h
Renamed SignalData::clear_snapshots to clear
[pulseview.git] / pv / data / decoderstack.h
index 844a2b547cef8f353007e09029b855024c2a4f44..029ca25c21c91350c7709074aacd6c7a758ff88d 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "signaldata.h"
 
-#include <map>
+#include <list>
 
 #include <boost/shared_ptr.hpp>
 #include <boost/thread.hpp>
@@ -31,8 +31,6 @@
 #include <QObject>
 #include <QString>
 
-#include <glib.h>
-
 struct srd_decoder;
 struct srd_probe;
 struct srd_proto_data;
@@ -54,6 +52,10 @@ class Annotation;
 
 namespace data {
 
+namespace decode {
+class Decoder;
+}
+
 class Logic;
 
 class DecoderStack : public QObject, public SignalData
@@ -70,27 +72,22 @@ public:
 
        virtual ~DecoderStack();
 
-       const srd_decoder* decoder() const;
+       const std::list< boost::shared_ptr<decode::Decoder> >& stack() const;
+       void push(boost::shared_ptr<decode::Decoder> decoder);
+       void remove(int index);
 
-       const std::map<const srd_probe*, boost::shared_ptr<view::LogicSignal> >&
-               probes() const;
-       void set_probes(std::map<const srd_probe*,
-               boost::shared_ptr<view::LogicSignal> > probes);
-
-       const GHashTable* options() const;
-
-       void set_option(const char *id, GVariant *value);
+       int64_t samples_decoded() const;
 
        const std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
                annotations() const;
 
        QString error_message();
 
-       void clear_snapshots();
+       void clear();
 
-private:
        void begin_decode();
 
+private:
        void decode_proc(boost::shared_ptr<data::Logic> data);
 
        static void annotation_callback(srd_proto_data *pdata,
@@ -109,12 +106,10 @@ private:
         */
        static boost::mutex _global_decode_mutex;
 
-       const srd_decoder *const _decoder;
-       std::map<const srd_probe*, boost::shared_ptr<view::LogicSignal> >
-               _probes;
-       GHashTable *_options;
+       std::list< boost::shared_ptr<decode::Decoder> > _stack;
 
        mutable boost::mutex _mutex;
+       int64_t _samples_decoded;
        std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
                _annotations;
        QString _error_message;