X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.h;h=80ad64cdfebf90398213d801ef184f128cc7d4bd;hb=f9101a91fc942a28515872ae6c7285973bd54b91;hp=029ca25c21c91350c7709074aacd6c7a758ff88d;hpb=caabb84c559023f179bf2c4600a5ebce34eab081;p=pulseview.git diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 029ca25..80ad64c 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; } @@ -78,13 +78,22 @@ public: int64_t samples_decoded() const; - const std::vector< boost::shared_ptr > - annotations() const; + std::vector get_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(); + uint64_t get_max_sample_count() const; + void begin_decode(); private: @@ -110,8 +119,11 @@ private: mutable boost::mutex _mutex; int64_t _samples_decoded; - std::vector< boost::shared_ptr > - _annotations; + + std::map _rows; + + std::map, decode::Row> _class_rows; + QString _error_message; boost::thread _decode_thread;