1 /* === S Y N F I G ========================================================= */
3 ** \brief ValueBase Link Header
5 ** $Id: valuelink.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
8 ** Copyright (c) 2004 Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_VALUELINK_H
26 #define __SYNFIG_VALUELINK_H
28 /* === H E A D E R S ======================================================= */
29 #include <synfig/valuenode.h>
31 /* === M A C R O S ========================================================= */
33 /* === T Y P E D E F S ===================================================== */
35 /* === C L A S S E S & S T R U C T S ======================================= */
39 /* NOTE: DO NOT USE THE INDEX BASED INTERFACE... THINGS WILL CHANGE
41 class ValueBaseLink : public synfig::LinkableValueNode
43 typedef std::vector<ValueNode::Handle> list_type;
48 virtual bool set_link_vfunc(int i,synfig::ValueNode::Handle x) {return false;}
49 virtual LinkableValueNode* create_new()const {return 0;}
52 list_type::const_iterator findlink(synfig::ValueNode::Handle x) const;
53 list_type::iterator findlink(synfig::ValueNode::Handle x);
55 public: //linkable interface
58 virtual synfig::ValueNode::LooseHandle get_link_vfunc(int i)const;
59 virtual int link_count()const;
61 //I have to support the thing because it's too much work otherwise
62 virtual synfig::String link_local_name(int i)const;
63 virtual synfig::String link_name(int i)const;
67 virtual ~ValueBaseLink();
70 virtual int get_link_index_from_name(const synfig::String &name)const;
72 //new add and subtract stuff
73 virtual void add(synfig::ValueNode::Handle v);
74 virtual void remove(synfig::ValueNode::Handle v);
78 }; // END of namespace studio
80 /* === E N D =============================================================== */