X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.h;h=339c1e0386daf3cd1b9421b67613956564444428;hp=dc656f91f7f9b503ff13a850cc35e0328a68a3f5;hb=dd048a7ec035447c051c7937ce04aca5be065b4e;hpb=a007f5ad25bad88cf62443d5471449ce8a6f5f29 diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index dc656f9..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; } @@ -78,8 +78,15 @@ public: 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(); @@ -112,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;