attempt to be compliant with gcc 4.6 (assuming that its more compliant with standards...
[ardour.git] / libs / evoral / evoral / ControlList.hpp
index 16d0400145b239d8fa87caa3615baafc6ddfefd1..87f214a60155d8ab703347e017f7b19f665b11b9 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
@@ -96,8 +96,8 @@ public:
        bool operator== (const ControlList&);
 
        virtual void freeze();
-        virtual void thaw ();
-        bool frozen() const { return _frozen; }
+       virtual void thaw ();
+       bool frozen() const { return _frozen; }
 
        const Parameter& parameter() const                 { return _parameter; }
        void             set_parameter(const Parameter& p) { _parameter = p; }
@@ -113,17 +113,20 @@ public:
        void x_scale (double factor);
        bool extend_to (double);
        void slide (iterator before, double distance);
-        void shift (double before, double distance);
+       void shift (double before, double distance);
+
+        virtual bool clamp_value (double& /*when*/, double& /*value*/) const { return true; }
 
        void rt_add (double when, double value);
        void add (double when, double value);
        void fast_simple_add (double when, double value);
-        void merge_nascent (double when);
+       void merge_nascent (double when);
 
        void reset_range (double start, double end);
        void erase_range (double start, double end);
        void erase (iterator);
        void erase (iterator, iterator);
+       void erase (double, double);
        bool move_ranges (std::list< RangeMove<double> > const &);
        void modify (iterator, double, double);
 
@@ -234,10 +237,10 @@ public:
        InterpolationStyle interpolation() const { return _interpolation; }
        void set_interpolation (InterpolationStyle);
 
-        virtual bool touching() const { return false; }
-        virtual bool writing() const { return false; }
-        virtual bool touch_enabled() const { return false; }
-        void write_pass_finished (double when);
+       virtual bool touching() const { return false; }
+       virtual bool writing() const { return false; }
+       virtual bool touch_enabled() const { return false; }
+       void write_pass_finished (double when);
 
        /** Emitted when mark_dirty() is called on this object */
        mutable PBD::Signal0<void> Dirty;
@@ -275,20 +278,18 @@ protected:
 
        Curve* _curve;
 
-        struct NascentInfo {
-            EventList events;
-            bool   is_touch;
-            double start_time;
-            double end_time;
+       struct NascentInfo {
+               EventList events;
+               double start_time;
+               double end_time;
             
-            NascentInfo (bool touching, double start = -1.0)
-                    : is_touch (touching)
-                    , start_time (start)
-                    , end_time (-1.0) 
-            {}
-        };
+               NascentInfo (double start = -1.0)
+                       : start_time (start)
+                       , end_time (-1.0) 
+                       {}
+       };
     
-        std::list<NascentInfo*> nascent;
+       std::list<NascentInfo*> nascent;
 };
 
 } // namespace Evoral