X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fnode.cpp;h=e0815bd47c4d9f2b0bf9d37ef88fcce12c426358;hb=93e30e79edac062b89bc904ea39e66e51da4fe34;hp=b809e758cd70b7cf829ad8b36d0a051699e020a4;hpb=9d1ad903c690121387c92c835afab398d9f80b5a;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/node.cpp b/synfig-core/trunk/src/synfig/node.cpp index b809e75..e0815bd 100644 --- a/synfig-core/trunk/src/synfig/node.cpp +++ b/synfig-core/trunk/src/synfig/node.cpp @@ -2,19 +2,20 @@ /*! \file node.cpp ** \brief Template File ** -** $Id: node.cpp,v 1.5 2005/01/07 03:29:12 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -117,22 +118,30 @@ refresh_node(synfig::Node* node, GUID old_guid) /* === M E T H O D S ======================================================= */ +#ifdef _DEBUG +const char * +TimePoint::c_str()const +{ + return get_time().get_string().c_str(); +} +#endif + void TimePoint::absorb(const TimePoint& x) { if(get_guid()==x.get_guid()) return; set_guid(get_guid()^x.get_guid()); - + if(get_after()==INTERPOLATION_NIL) set_after(x.get_after()); if(get_before()==INTERPOLATION_NIL) set_before(x.get_before()); - + if(get_after()!=x.get_after() && x.get_after()!=INTERPOLATION_NIL) set_after(INTERPOLATION_UNDEFINED); if(get_before()!=x.get_before() && x.get_before()!=INTERPOLATION_NIL) - set_before(INTERPOLATION_UNDEFINED); + set_before(INTERPOLATION_UNDEFINED); } TimePointSet::iterator @@ -170,7 +179,7 @@ Node::Node(): guid_.make_unique(); assert(guid_); assert(!global_node_map().count(guid_)); - global_node_map()[guid_]=this; + global_node_map()[guid_]=this; #endif } @@ -204,10 +213,10 @@ Node::get_guid()const const_cast(guid_).make_unique(); assert(guid_); assert(!global_node_map().count(guid_)); - global_node_map()[guid_]=const_cast(this); + global_node_map()[guid_]=const_cast(this); } #endif - + return guid_; } @@ -222,7 +231,7 @@ Node::set_guid(const GUID& x) { guid_=x; assert(!global_node_map().count(guid_)); - global_node_map()[guid_]=this; + global_node_map()[guid_]=this; } else #endif @@ -268,7 +277,7 @@ Node::get_times() const get_times_vfunc(times); bchanged = false; } - + //set the output set... return times; }