2 /* === S Y N F I G ========================================================= */
3 /*! \file activepoint.h
4 ** \brief Template Header
9 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** Copyright (c) 2007 Chris Moore
12 ** This package is free software; you can redistribute it and/or
13 ** modify it under the terms of the GNU General Public License as
14 ** published by the Free Software Foundation; either version 2 of
15 ** the License, or (at your option) any later version.
17 ** This package is distributed in the hope that it will be useful,
18 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ** General Public License for more details.
23 /* ========================================================================= */
25 /* === S T A R T =========================================================== */
27 #ifndef __SYNFIG_ACTIVEPOINT_H
28 #define __SYNFIG_ACTIVEPOINT_H
30 /* === H E A D E R S ======================================================= */
36 /* === M A C R O S ========================================================= */
38 /* === T Y P E D E F S ===================================================== */
40 /* === C L A S S E S & S T R U C T S ======================================= */
46 struct Activepoint : public UniqueID
49 etl::loose_handle<ValueNode> parent_;
53 //! Time of the activepoint
59 //! Does this activepoint turn the entry on, or off?
62 bool operator<(const Activepoint& rhs) { return time<rhs.time; }
63 bool operator<(const Time& rhs) { return time<rhs; }
65 Activepoint(const Time &time, const bool &state, int p=0): time(time), priority(p),state(state) { }
66 //! \todo Should priority be initialized here, or elsewhere? This avoids a valgrind warning for now.
67 Activepoint(): priority(0) { }
69 const Time& get_time()const { return time; }
70 void set_time(const Time& x) { time=x; }
72 bool get_state()const { return state; }
73 void set_state(bool x) { state=x; }
75 int get_priority()const { return priority; }
76 void set_priority(int x) { priority=x; }
78 const etl::loose_handle<ValueNode> &get_parent_value_node()const { return parent_; }
79 void set_parent_value_node(const etl::loose_handle<ValueNode> &x) { parent_=x; }
81 int get_parent_index()const { return index; }
82 void set_parent_index(int x) { index=x; }
85 }; // END of struct ValueNode_BLine::Activepoint
87 }; // END of namespace synfig
89 /* === E N D =============================================================== */