1 /* === S Y N F I G ========================================================= */
2 /*! \file valuenode_reference.cpp
3 ** \brief Template File
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., 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 /* === H E A D E R S ======================================================= */
32 #include "valuenode_reference.h"
33 #include "valuenode_const.h"
38 /* === U S I N G =========================================================== */
42 using namespace synfig;
44 /* === M A C R O S ========================================================= */
46 /* === G L O B A L S ======================================================= */
48 /* === P R O C E D U R E S ================================================= */
50 /* === M E T H O D S ======================================================= */
52 ValueNode_Reference::ValueNode_Reference(const ValueBase::Type &x):
57 ValueNode_Reference::ValueNode_Reference(const ValueNode::Handle &x):
58 LinkableValueNode(x->get_type())
64 ValueNode_Reference::create(const ValueBase &x)
66 return new ValueNode_Reference(ValueNode_Const::create(x));
70 ValueNode_Reference::create_new()const
72 return new ValueNode_Reference(get_type());
75 ValueNode_Reference::~ValueNode_Reference()
81 ValueNode_Reference::set_link_vfunc(int i,ValueNode::Handle x)
84 if(x->get_type()!=get_type() && !PlaceholderValueNode::Handle::cast_dynamic(x))
87 signal_child_changed()(i);signal_value_changed()();
91 ValueNode::LooseHandle
92 ValueNode_Reference::get_link_vfunc(int i)const
99 ValueNode_Reference::link_count()const
105 ValueNode_Reference::link_local_name(int i)const
112 ValueNode_Reference::link_name(int i)const
118 ValueNode_Reference::get_link_index_from_name(const String &name)const
123 throw Exception::BadLinkName(name);
127 ValueNode_Reference::operator()(Time t)const
134 ValueNode_Reference::get_name()const
140 ValueNode_Reference::get_local_name()const
142 return _("Reference");
146 ValueNode_Reference::check_type(ValueBase::Type type)