Ardour  9.0-pre0-582-g084a23a80d
Curve.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 David Robillard <d@drobilla.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EVORAL_CURVE_HPP
20 #define EVORAL_CURVE_HPP
21 
22 #include <inttypes.h>
23 
24 #include "temporal/timeline.h"
25 
26 #include "evoral/visibility.h"
27 
28 namespace Evoral {
29 
30 class ControlList;
31 
33 {
34 public:
35  Curve (const ControlList& cl);
36  Curve (const Curve&) = delete;
37  Curve& operator= (const Curve&) = delete;
38 
39  bool rt_safe_get_vector (Temporal::timepos_t const & x0, Temporal::timepos_t const & x1, float *arg, int32_t veclen) const;
40  void get_vector (Temporal::timepos_t const & x0, Temporal::timepos_t const & x1, float *arg, int32_t veclen) const;
41 
42  void solve () const;
43 
44  void mark_dirty() const { _dirty = true; }
45 
46 private:
47  double multipoint_eval (Temporal::timepos_t const & x) const;
48 
49  void _get_vector (Temporal::timepos_t x0, Temporal::timepos_t x1, float *arg, int32_t veclen) const;
50 
51  mutable bool _dirty;
53 };
54 
55 } // namespace Evoral
56 
57 #endif // EVORAL_CURVE_HPP
58 
double multipoint_eval(Temporal::timepos_t const &x) const
Curve(const Curve &)=delete
const ControlList & _list
Definition: Curve.h:52
void mark_dirty() const
Definition: Curve.h:44
bool rt_safe_get_vector(Temporal::timepos_t const &x0, Temporal::timepos_t const &x1, float *arg, int32_t veclen) const
void solve() const
bool _dirty
Definition: Curve.h:51
Curve(const ControlList &cl)
void _get_vector(Temporal::timepos_t x0, Temporal::timepos_t x1, float *arg, int32_t veclen) const
void get_vector(Temporal::timepos_t const &x0, Temporal::timepos_t const &x1, float *arg, int32_t veclen) const
#define LIBEVORAL_API
Definition: editor.h:86
DebugBits ControlList