prep for beta1
[ardour.git] / libs / evoral / evoral / Sequence.hpp
index 77d06a673e8d8bf079bf348c2df28bf95ff5e63a..9f12de292adbe84014d92928c9bf6fb503469cb8 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Evoral.
- * Copyright (C) 2008 Dave Robillard <http://drobilla.net>
+ * Copyright (C) 2008 David Robillard <http://drobilla.net>
  * Copyright (C) 2000-2008 Paul Davis
  *
  * Evoral is free software; you can redistribute it and/or modify it under the
@@ -97,7 +97,14 @@ public:
 
        void start_write();
        bool writing() const { return _writing; }
-       void end_write(bool delete_stuck=false);
+
+        enum StuckNoteOption {
+               Relax,
+               DeleteStuckNotes,
+               ResolveStuckNotes
+       };
+
+        void end_write (StuckNoteOption, Time when = 0);
 
        void append(const Event<Time>& ev, Evoral::event_id_t evid);
 
@@ -191,6 +198,8 @@ public:
        inline       PatchChanges& patch_changes ()       { return _patch_changes; }
        inline const PatchChanges& patch_changes () const { return _patch_changes; }
 
+        void dump (std::ostream&) const;
+
 private:
        typedef std::priority_queue<NotePtr, std::deque<NotePtr>, LaterNoteEndComparator> ActiveNotes;
 public:
@@ -289,6 +298,8 @@ protected:
        inline       Pitches& pitches(uint8_t chan)       { return _pitches[chan&0xf]; }
        inline const Pitches& pitches(uint8_t chan) const { return _pitches[chan&0xf]; }
 
+       virtual void control_list_marked_dirty ();
+
 private:
        friend class const_iterator;
 
@@ -304,8 +315,6 @@ private:
        void get_notes_by_pitch (Notes&, NoteOperator, uint8_t val, int chan_mask = 0) const;
        void get_notes_by_velocity (Notes&, NoteOperator, uint8_t val, int chan_mask = 0) const;
 
-       void control_list_marked_dirty ();
-
        const TypeMap& _type_map;
 
        Notes        _notes;       // notes indexed by time
@@ -332,5 +341,7 @@ private:
 
 } // namespace Evoral
 
+// template<typename Time> std::ostream& operator<<(std::ostream& o, const Evoral::Sequence<Time>& s) { s.dump (o); return o; }
+
 #endif // EVORAL_SEQUENCE_HPP