Store annotations as objects emplaced in the vector
[pulseview.git] / pv / data / decoderstack.h
index fe03df0aca3011f4f0d1d2c3a116621b6068e23c..58dd887145c62cc6bb98dfa18d43c316112b649b 100644 (file)
@@ -76,12 +76,15 @@ public:
        void push(boost::shared_ptr<decode::Decoder> decoder);
        void remove(int index);
 
-       const std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
-               annotations() const;
+       int64_t samples_decoded() const;
+
+       const std::vector<pv::view::decode::Annotation> annotations() const;
 
        QString error_message();
 
-       void clear_snapshots();
+       void clear();
+
+       uint64_t get_max_sample_count() const;
 
        void begin_decode();
 
@@ -107,8 +110,8 @@ private:
        std::list< boost::shared_ptr<decode::Decoder> > _stack;
 
        mutable boost::mutex _mutex;
-       std::vector< boost::shared_ptr<pv::view::decode::Annotation> >
-               _annotations;
+       int64_t _samples_decoded;
+       std::vector<pv::view::decode::Annotation> _annotations;
        QString _error_message;
 
        boost::thread _decode_thread;