+ segments_.push_back(segment);
+}
+
+const deque< shared_ptr<LogicSegment> >& Logic::logic_segments() const
+{
+ return segments_;
+}
+
+vector< shared_ptr<Segment> > Logic::segments() const
+{
+ return vector< shared_ptr<Segment> >(segments_.begin(), segments_.end());
+}
+
+uint32_t Logic::get_segment_count() const
+{
+ return (uint32_t)segments_.size();
+}
+
+void Logic::clear()
+{
+ segments_.clear();
+
+ samples_cleared();
+}
+
+double Logic::get_samplerate() const
+{
+ if (segments_.empty())
+ return 1.0;
+
+ return segments_.front()->samplerate();