]> sigrok.org Git - pulseview.git/blobdiff - pv/data/logic.hpp
Fix clang warning: shifting a negative signed value is undefined
[pulseview.git] / pv / data / logic.hpp
index 51e12cb984db45675ac8a47886d771ebe8f538ed..a597027f85f7f3d4cc310bf4ad2d5e2bb334e829 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#ifndef PULSEVIEW_PV_DATA_LOGIC_H
-#define PULSEVIEW_PV_DATA_LOGIC_H
+#ifndef PULSEVIEW_PV_DATA_LOGIC_HPP
+#define PULSEVIEW_PV_DATA_LOGIC_HPP
 
 #include "signaldata.hpp"
 
 #include <deque>
-#include <memory>
 
 namespace pv {
 namespace data {
 
-class LogicSnapshot;
+class LogicSegment;
 
 class Logic : public SignalData
 {
 public:
        Logic(unsigned int num_channels);
 
-       int get_num_channels() const;
+       unsigned int num_channels() const;
 
-       void push_snapshot(
-               std::shared_ptr<LogicSnapshot> &snapshot);
+       void push_segment(
+               std::shared_ptr<LogicSegment> &segment);
 
-       std::deque< std::shared_ptr<LogicSnapshot> >&
-               get_snapshots();
+       const std::deque< std::shared_ptr<LogicSegment> >&
+               logic_segments() const;
+
+       std::vector< std::shared_ptr<Segment> > segments() const;
 
        void clear();
 
-       uint64_t get_max_sample_count() const;
+       uint64_t max_sample_count() const;
 
 private:
        const unsigned int num_channels_;
-       std::deque< std::shared_ptr<LogicSnapshot> > snapshots_;
+       std::deque< std::shared_ptr<LogicSegment> > segments_;
 };
 
 } // namespace data
 } // namespace pv
 
-#endif // PULSEVIEW_PV_DATA_LOGIC_H
+#endif // PULSEVIEW_PV_DATA_LOGIC_HPP