more updates
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_linear.h
1 /* === S I N F G =========================================================== */
2 /*!     \file valuenode_linear.h
3 **      \brief Template Header
4 **
5 **      $Id: valuenode_linear.h,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
6 **
7 **      \legal
8 **      Copyright (c) 2002 Robert B. Quattlebaum Jr.
9 **
10 **      This software and associated documentation
11 **      are CONFIDENTIAL and PROPRIETARY property of
12 **      the above-mentioned copyright holder.
13 **
14 **      You may not copy, print, publish, or in any
15 **      other way distribute this software without
16 **      a prior written agreement with
17 **      the copyright holder.
18 **      \endlegal
19 */
20 /* ========================================================================= */
21
22 /* === S T A R T =========================================================== */
23
24 #ifndef __SINFG_VALUENODE_INTERPOLATION_LINEAR_H
25 #define __SINFG_VALUENODE_INTERPOLATION_LINEAR_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include "valuenode.h"
30
31 /* === M A C R O S ========================================================= */
32
33 /* === C L A S S E S & S T R U C T S ======================================= */
34
35 namespace sinfg {
36
37 class ValueNode_Linear : public LinkableValueNode
38 {
39         ValueNode::RHandle m_;
40         ValueNode::RHandle b_;
41         
42         ValueNode_Linear(const ValueBase::Type &x);
43
44 public:
45
46         typedef etl::handle<ValueNode_Linear> Handle;
47         typedef etl::handle<const ValueNode_Linear> ConstHandle;
48
49
50         virtual ValueBase operator()(Time t)const;
51
52         virtual ~ValueNode_Linear();
53
54         virtual String get_name()const;
55         virtual String get_local_name()const;
56
57
58         virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
59         virtual int link_count()const;
60         virtual String link_name(int i)const;
61
62         virtual String link_local_name(int i)const;
63         virtual int get_link_index_from_name(const String &name)const;
64
65 protected:
66         LinkableValueNode* create_new()const;
67         virtual bool set_link_vfunc(int i,ValueNode::Handle x);
68
69 public:
70         using sinfg::LinkableValueNode::get_link_vfunc;
71
72         using sinfg::LinkableValueNode::set_link_vfunc;
73         static bool check_type(ValueBase::Type type);
74         static ValueNode_Linear* create(const ValueBase &x);
75 }; // END of class ValueNode_Linear
76
77 }; // END of namespace sinfg
78
79 /* === E N D =============================================================== */
80
81 #endif