Added copyright lines for files I've edited this year.
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_blinereversetangent.cpp
index 02e794d..cd05015 100644 (file)
@@ -6,7 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-**     Copyright (c) 2007 Chris Moore
+**     Copyright (c) 2007, 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -64,7 +64,7 @@ ValueNode_BLineRevTangent::ValueNode_BLineRevTangent(const ValueNode::Handle &x)
        LinkableValueNode(x->get_type())
 {
        if(x->get_type()!=ValueBase::TYPE_BLINEPOINT)
-               throw Exception::BadType(ValueBase::type_name(x->get_type()));
+               throw Exception::BadType(ValueBase::type_local_name(x->get_type()));
 
        set_link("reference",x);
        set_link("reverse",ValueNode_Const::create(bool(false)));
@@ -126,19 +126,14 @@ ValueNode_BLineRevTangent::get_local_name()const
 }
 
 bool
-ValueNode_BLineRevTangent::set_link_vfunc(int i,ValueNode::Handle x)
+ValueNode_BLineRevTangent::set_link_vfunc(int i,ValueNode::Handle value)
 {
        assert(i>=0 && i<link_count());
+
        switch(i)
        {
-               case 0:
-                       reference_=x;
-                       signal_child_changed()(i);signal_value_changed()();
-                       return true;
-               case 1:
-                       reverse_=x;
-                       signal_child_changed()(i);signal_value_changed()();
-                       return true;
+       case 0: CHECK_TYPE_AND_SET_VALUE(reference_, get_type());
+       case 1: CHECK_TYPE_AND_SET_VALUE(reverse_,   ValueBase::TYPE_BOOL);
        }
        return false;
 }
@@ -147,6 +142,7 @@ ValueNode::LooseHandle
 ValueNode_BLineRevTangent::get_link_vfunc(int i)const
 {
        assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0: return reference_;
@@ -166,6 +162,7 @@ String
 ValueNode_BLineRevTangent::link_name(int i)const
 {
        assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0: return "reference";
@@ -178,6 +175,7 @@ String
 ValueNode_BLineRevTangent::link_local_name(int i)const
 {
        assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0: return _("Reference");