X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.h;h=339c1e0386daf3cd1b9421b67613956564444428;hb=dd048a7ec035447c051c7937ce04aca5be065b4e;hp=8b9d29b2bf89e487c31bf12e030b98678d618e2c;hpb=7491a29f33471b38e161b3254f4d8e708b05f929;p=pulseview.git diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 8b9d29b..339c1e0 100644 --- a/pv/data/decoderstack.h +++ b/pv/data/decoderstack.h @@ -31,7 +31,11 @@ #include #include +#include +#include + struct srd_decoder; +struct srd_decoder_annotation_row; struct srd_probe; struct srd_proto_data; @@ -43,16 +47,12 @@ namespace pv { namespace view { class LogicSignal; - -namespace decode { -class Annotation; -} - } namespace data { namespace decode { +class Annotation; class Decoder; } @@ -74,13 +74,25 @@ public: const std::list< boost::shared_ptr >& stack() const; void push(boost::shared_ptr decoder); + void remove(int index); + + int64_t samples_decoded() const; - const std::vector< boost::shared_ptr > - annotations() const; + std::vector get_visible_rows() const; + + /** + * Extracts sorted annotations between two period into a vector. + */ + void get_annotation_subset( + std::vector &dest, + const decode::Row &row, uint64_t start_sample, + uint64_t end_sample) const; QString error_message(); - void clear_snapshots(); + void clear(); + + uint64_t get_max_sample_count() const; void begin_decode(); @@ -106,8 +118,12 @@ private: std::list< boost::shared_ptr > _stack; mutable boost::mutex _mutex; - std::vector< boost::shared_ptr > - _annotations; + int64_t _samples_decoded; + + std::map _rows; + + std::map, decode::Row> _class_rows; + QString _error_message; boost::thread _decode_thread;