return 0;
}
-int
-ValueNode_Random::link_count()const
-{
- return 6;
-}
-
-String
-ValueNode_Random::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "link";
- case 1: return "radius";
- case 2: return "seed";
- case 3: return "speed";
- case 4: return "smooth";
- case 5: return "loop";
- }
- return String();
-}
-
-String
-ValueNode_Random::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Link");
- case 1: return _("Radius");
- case 2: return _("Seed");
- case 3: return _("Animation Speed");
- case 4: return _("Interpolation");
- case 5: return _("Loop Time");
- }
- return String();
-}
-
-int
-ValueNode_Random::get_link_index_from_name(const String &name)const
-{
- if(name=="link" ) return 0;
- if(name=="radius") return 1;
- if(name=="seed" ) return 2;
- if(name=="speed" ) return 3;
- if(name=="smooth") return 4;
- if(name=="loop" ) return 5;
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_Random::check_type(ValueBase::Type type)
{
virtual String get_local_name()const;
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
virtual ValueNode* clone(const GUID& deriv_guid=GUID())const;
}
}
-int
-ValueNode_Add::link_count()const
-{
- return 3;
-}
-
String
ValueNode_Add::get_name()const
{
virtual ValueBase operator()(Time t)const;
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
virtual String get_name()const;
virtual String get_local_name()const;
static bool check_type(ValueBase::Type type);
return 0;
}
-int
-ValueNode_And::link_count()const
-{
- return 2;
-}
-
ValueBase
ValueNode_And::operator()(Time t)const
{
virtual String get_name()const;
virtual String get_local_name()const;
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_AngleString::link_count()const
-{
- return 4;
-}
-
bool
ValueNode_AngleString::check_type(ValueBase::Type type)
{
virtual String get_name()const;
virtual String get_local_name()const;
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Atan2::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_Atan2::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "x";
- if(i==1)
- return "y";
- return String();
-}
-
-String
-ValueNode_Atan2::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("X");
- if(i==1)
- return _("Y");
- return String();
-}
-
-int
-ValueNode_Atan2::get_link_index_from_name(const String &name)const
-{
- if(name=="x")
- return 0;
- if(name=="y")
- return 1;
-
- throw Exception::BadLinkName(name);
-}
-
LinkableValueNode::Vocab
ValueNode_Atan2::get_children_vocab_vfunc()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_BLineCalcTangent::link_count()const
-{
- return 6;
-}
-
-String
-ValueNode_BLineCalcTangent::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "bline";
- case 1: return "loop";
- case 2: return "amount";
- case 3: return "offset";
- case 4: return "scale";
- case 5: return "fixed_length";
- }
- return String();
-}
-
-String
-ValueNode_BLineCalcTangent::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("BLine");
- case 1: return _("Loop");
- case 2: return _("Amount");
- case 3: return _("Offset");
- case 4: return _("Scale");
- case 5: return _("Fixed Length");
- }
- return String();
-}
-
-int
-ValueNode_BLineCalcTangent::get_link_index_from_name(const String &name)const
-{
- if (name=="bline") return 0;
- if (name=="loop") return 1;
- if (name=="amount") return 2;
- if (name=="offset") return 3;
- if (name=="scale") return 4;
- if (name=="fixed_length") return 5;
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_BLineCalcTangent::check_type(ValueBase::Type type)
{
virtual String get_local_name()const;
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
return 0;
}
-int
-ValueNode_BLineCalcVertex::link_count()const
-{
- return 3;
-}
-
-String
-ValueNode_BLineCalcVertex::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "bline";
- case 1: return "loop";
- case 2: return "amount";
- }
- return String();
-}
-
-String
-ValueNode_BLineCalcVertex::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("BLine");
- case 1: return _("Loop");
- case 2: return _("Amount");
- }
- return String();
-}
-
-int
-ValueNode_BLineCalcVertex::get_link_index_from_name(const String &name)const
-{
- if(name=="bline") return 0;
- if(name=="loop") return 1;
- if(name=="amount") return 2;
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_BLineCalcVertex::check_type(ValueBase::Type type)
{
virtual String get_local_name()const;
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_BLineCalcWidth::link_count()const
-{
- return 4;
-}
-
-String
-ValueNode_BLineCalcWidth::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "bline";
- case 1: return "loop";
- case 2: return "amount";
- case 3: return "scale";
- }
- return String();
-}
-
-String
-ValueNode_BLineCalcWidth::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("BLine");
- case 1: return _("Loop");
- case 2: return _("Amount");
- case 3: return _("Scale");
- }
- return String();
-}
-
-int
-ValueNode_BLineCalcWidth::get_link_index_from_name(const String &name)const
-{
- if(name=="bline") return 0;
- if(name=="loop") return 1;
- if(name=="amount") return 2;
- if(name=="scale") return 3;
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_BLineCalcWidth::check_type(ValueBase::Type type)
{
virtual String get_local_name()const;
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_BLineRevTangent::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_BLineRevTangent::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "reference";
- case 1: return "reverse";
- }
- return String();
-}
-
-String
-ValueNode_BLineRevTangent::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Reference");
- case 1: return _("Reverse");
- }
- return String();
-}
-
-int
-ValueNode_BLineRevTangent::get_link_index_from_name(const String &name)const
-{
- if(name=="reference") return 0;
- if(name=="reverse") return 1;
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_BLineRevTangent::check_type(ValueBase::Type type)
{
virtual String get_local_name()const;
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
return 0;
}
-int
-ValueNode_Compare::link_count()const
-{
- return 5;
-}
-
-String
-ValueNode_Compare::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return _("LHS");
- if(i==1) return _("RHS");
- if(i==2) return _("Greater Than");
- if(i==3) return _("Equal to");
- if(i==4) return _("Less Than");
- return String();
-}
-
-String
-ValueNode_Compare::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "lhs";
- if(i==1) return "rhs";
- if(i==2) return "greater";
- if(i==3) return "equal";
- if(i==4) return "less";
- return String();
-}
-
-int
-ValueNode_Compare::get_link_index_from_name(const String &name)const
-{
- if(name=="lhs") return 0;
- if(name=="rhs") return 1;
- if(name=="greater") return 2;
- if(name=="equal") return 3;
- if(name=="less") return 4;
-
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_Compare::operator()(Time t)const
{
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
}
}
-int
-ValueNode_Composite::link_count()const
-{
- switch(get_type())
- {
- case ValueBase::TYPE_VECTOR:
- return 2;
- case ValueBase::TYPE_COLOR:
- return 4;
- case ValueBase::TYPE_SEGMENT:
- return 4;
- case ValueBase::TYPE_BLINEPOINT:
- return 6;
- default:
- synfig::warning(string("ValueNode_Composite::component_count():")+_("Bad type for composite"));
- return 1;
- }
-}
-
bool
ValueNode_Composite::set_link_vfunc(int i,ValueNode::Handle x)
{
}
String
-ValueNode_Composite::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(get_type())
- {
- case ValueBase::TYPE_VECTOR:
- return strprintf("%c-Axis",'X'+i);
-
- case ValueBase::TYPE_COLOR:
- if(i==0)
- return _("Red");
- else if(i==1)
- return _("Green");
- else if(i==2)
- return _("Blue");
- else if(i==3)
- return _("Alpha");
-
- case ValueBase::TYPE_SEGMENT:
- if(i==0)
- return _("Vertex 1");
- else if(i==1)
- return _("Tangent 1");
- else if(i==2)
- return _("Vertex 2");
- else if(i==3)
- return _("Tangent 2");
-
- case ValueBase::TYPE_BLINEPOINT:
- if(i==0)
- return _("Vertex");
- else if(i==1)
- return _("Width");
- else if(i==2)
- return _("Origin");
- else if(i==3)
- return _("Split Tangents");
- else if(i==4)
- return _("Tangent 1");
- else if(i==5)
- return _("Tangent 2");
-
- default:
- assert(0);
- // notice that Composite counts from 1 and Radial Composite counts
- // from 0! we need to keep it like that to correctly load old
- // animations, but let's not save "c%d" format link names in future
- return etl::strprintf(_("C%d"),i+1);
- }
-}
-
-
-String
ValueNode_Composite::link_name(int i)const
{
assert(i>=0 && i<link_count());
if (get_file_version() < RELEASE_VERSION_0_61_08)
return strprintf("c%d",i+1);
- switch(get_type())
- {
- case ValueBase::TYPE_COLOR:
- switch(i)
- {
- case 0: return "red";
- case 1: return "green";
- case 2: return "blue";
- case 3: return "alpha";
- }
- break;
- case ValueBase::TYPE_SEGMENT:
- switch(i)
- {
- case 0: return "p1";
- case 1: return "t1";
- case 2: return "p2";
- case 3: return "t2";
- }
- break;
- case ValueBase::TYPE_VECTOR:
- switch(i)
- {
- case 0: return "x";
- case 1: return "y";
- }
- break;
- case ValueBase::TYPE_BLINEPOINT:
- switch(i)
- {
- case 0: return "point";
- case 1: return "width";
- case 2: return "origin";
- case 3: return "split";
- case 4: return "t1";
- case 5: return "t2";
- }
- break;
- default:
- break;
- }
-
- assert(0);
- // notice that Composite counts from 1 and Radial Composite counts
- // from 0! we need to keep it like that to correctly load old
- // animations, but let's not save "c%d" format link names in future
- return strprintf("c%d",i+1);
+ return LinkableValueNode::link_name(i);
}
int
ValueNode_Composite::get_link_index_from_name(const String &name)const
{
+ // Here we don't use the LinkableValueNode::get_link_index_from_name
+ // due to the particularities of the link index from name for old files.
+ // So we keep this alive to maintain old file compatibilities.
if(name.empty())
throw Exception::BadLinkName(name);
~ValueNode_Composite();
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
virtual String link_name(int i)const;
- virtual String link_local_name(int i)const;
virtual ValueBase operator()(Time t)const;
-
-
virtual String get_name()const;
virtual String get_local_name()const;
virtual int get_link_index_from_name(const String &name)const;
return 0;
}
-int
-ValueNode_Cos::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_Cos::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "angle";
- case 1: return "amp";
- }
-
- return String();
-}
-
-String
-ValueNode_Cos::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Angle");
- case 1: return _("Amplitude");
- }
-
- return String();
-}
-
-int
-ValueNode_Cos::get_link_index_from_name(const String &name)const
-{
- if(name=="angle") return 0;
- if(name=="amp") return 1;
-
- throw Exception::BadLinkName(name);
-}
-
LinkableValueNode::Vocab
ValueNode_Cos::get_children_vocab_vfunc()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_DotProduct::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_DotProduct::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "lhs";
- case 1: return "rhs";
- }
- return String();
-}
-
-String
-ValueNode_DotProduct::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("LHS");
- case 1: return _("RHS");
- }
- return String();
-}
-
-int
-ValueNode_DotProduct::get_link_index_from_name(const String &name)const
-{
- if (name=="lhs") return 0;
- if (name=="rhs") return 1;
-
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_DotProduct::check_type(ValueBase::Type type)
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Duplicate::link_count()const
-{
- return 3;
-}
-
-String
-ValueNode_Duplicate::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return _("From");
- if(i==1) return _("To");
- if(i==2) return _("Step");
- return String();
-}
-
-String
-ValueNode_Duplicate::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "from";
- if(i==1) return "to";
- if(i==2) return "step";
- return String();
-}
-
-int
-ValueNode_Duplicate::get_link_index_from_name(const String &name)const
-{
- if(name=="from") return 0;
- if(name=="to") return 1;
- if(name=="step") return 2;
-
- throw Exception::BadLinkName(name);
-}
-
void
ValueNode_Duplicate::reset_index(Time t)const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Exp::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_Exp::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "exp";
- if(i==1)
- return "scale";
- return String();
-}
-
-String
-ValueNode_Exp::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("Exponent");
- if(i==1)
- return _("Scale");
- return String();
-}
-
-int
-ValueNode_Exp::get_link_index_from_name(const String &name)const
-{
- if(name=="exp")
- return 0;
- if(name=="scale")
- return 1;
-
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_Exp::check_type(ValueBase::Type type)
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_GradientColor::link_count()const
-{
- return 3;
-}
-
-String
-ValueNode_GradientColor::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Gradient");
- case 1: return _("Index");
- case 2: return _("Loop");
- }
- return String();
-}
-
-String
-ValueNode_GradientColor::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "gradient";
- case 1: return "index";
- case 2: return "loop";
- }
- return String();
-}
-
-int
-ValueNode_GradientColor::get_link_index_from_name(const String &name)const
-{
- if (name=="gradient") return 0;
- if (name=="index") return 1;
- if (name=="loop") return 2;
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_GradientColor::get_name()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_GradientRotate::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_GradientRotate::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0:
- return _("Gradient");
- case 1:
- return _("Offset");
- default:
- return String();
- }
-}
-
-String
-ValueNode_GradientRotate::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0:
- return "gradient";
- case 1:
- return "offset";
- default: return String();
- }
-}
-
-int
-ValueNode_GradientRotate::get_link_index_from_name(const String &name)const
-{
- if(name=="gradient")
- return 0;
- if(name=="offset")
- return 1;
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_GradientRotate::get_name()const
{
virtual ~ValueNode_GradientRotate();
-// static Handle create(ValueBase::Type id=ValueBase::TYPE_GRADIENT);
-
-
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
-
- virtual String link_local_name(int i)const;
- virtual String link_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
-
virtual ValueBase operator()(Time t)const;
virtual String get_name()const;
return 0;
}
-int
-ValueNode_Integer::link_count()const
-{
- return 1;
-}
-
-String
-ValueNode_Integer::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return _("Integer");
- return String();
-}
-
-String
-ValueNode_Integer::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "integer";
- return String();
-}
-
-int
-ValueNode_Integer::get_link_index_from_name(const String &name)const
-{
- if(name=="integer") return 0;
-
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_Integer::operator()(Time t)const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_IntString::link_count()const
-{
- return 3;
-}
-
-String
-ValueNode_IntString::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "int";
- case 1: return "width";
- case 2: return "zero_pad";
- }
- return String();
-}
-
-String
-ValueNode_IntString::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Int");
- case 1: return _("Width");
- case 2: return _("Zero Padded");
- }
- return String();
-}
-
-int
-ValueNode_IntString::get_link_index_from_name(const String &name)const
-{
- if (name=="int") return 0;
- if (name=="width") return 1;
- if (name=="zero_pad") return 2;
-
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_IntString::check_type(ValueBase::Type type)
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Join::link_count()const
-{
- return 4;
-}
-
-String
-ValueNode_Join::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "strings";
- case 1: return "before";
- case 2: return "separator";
- case 3: return "after";
- }
- return String();
-}
-
-String
-ValueNode_Join::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Strings");
- case 1: return _("Before");
- case 2: return _("Separator");
- case 3: return _("After");
- }
- return String();
-}
-
-int
-ValueNode_Join::get_link_index_from_name(const String &name)const
-{
- if (name=="strings") return 0;
- if (name=="before") return 1;
- if (name=="separator") return 2;
- if (name=="after") return 3;
-
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_Join::check_type(ValueBase::Type type)
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Linear::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_Linear::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "slope";
- if(i==1) return "offset";
- return String();
-}
-
-String
-ValueNode_Linear::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- switch(get_type())
- {
- case ValueBase::TYPE_ANGLE:
- case ValueBase::TYPE_COLOR:
- case ValueBase::TYPE_INTEGER:
- case ValueBase::TYPE_REAL:
- case ValueBase::TYPE_TIME:
- return _("Rate");
- case ValueBase::TYPE_VECTOR:
- default:
- return _("Slope");
- }
- if(i==1)
- return _("Offset");
- return String();
-}
-
-int
-ValueNode_Linear::get_link_index_from_name(const String &name)const
-{
- if(name=="slope") return 0;
- if(name=="offset") return 1;
-
- throw Exception::BadLinkName(name);
-}
-
-
LinkableValueNode::Vocab
ValueNode_Linear::get_children_vocab_vfunc()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Logarithm::link_count()const
-{
- return 3;
-}
-
-String
-ValueNode_Logarithm::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return _("Link");
- if(i==1) return _("Epsilon");
- if(i==2) return _("Infinite");
- return String();
-}
-
-String
-ValueNode_Logarithm::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "link";
- if(i==1) return "epsilon";
- if(i==2) return "infinite";
- return String();
-}
-
-int
-ValueNode_Logarithm::get_link_index_from_name(const String &name)const
-{
- if(name=="link") return 0;
- if(name=="epsilon") return 1;
- if(name=="infinite") return 2;
-
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_Logarithm::operator()(Time t)const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Not::link_count()const
-{
- return 1;
-}
-
-String
-ValueNode_Not::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return _("Link");
- return String();
-}
-
-String
-ValueNode_Not::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "link";
- return String();
-}
-
-int
-ValueNode_Not::get_link_index_from_name(const String &name)const
-{
- if(name=="link") return 0;
-
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_Not::operator()(Time t)const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Or::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_Or::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return _("Link1");
- if(i==1) return _("Link2");
- return String();
-}
-
-String
-ValueNode_Or::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "link1";
- if(i==1) return "link2";
- return String();
-}
-
-int
-ValueNode_Or::get_link_index_from_name(const String &name)const
-{
- if(name=="link1") return 0;
- if(name=="link2") return 1;
-
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_Or::operator()(Time t)const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Pow::link_count()const
-{
- return 4;
-}
-
-String
-ValueNode_Pow::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return _("Base");
- if(i==1) return _("Power");
- if(i==2) return _("Epsilon");
- if(i==3) return _("Infinite");
- return String();
-}
-
-String
-ValueNode_Pow::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "base";
- if(i==1) return "power";
- if(i==2) return "epsilon";
- if(i==3) return "infinite";
- return String();
-}
-
-int
-ValueNode_Pow::get_link_index_from_name(const String &name)const
-{
- if(name=="base") return 0;
- if(name=="power") return 1;
- if(name=="epsilon") return 2;
- if(name=="infinite") return 3;
-
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_Pow::operator()(Time t)const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
}
}
-int
-ValueNode_RadialComposite::link_count()const
-{
- switch(get_type())
- {
- case ValueBase::TYPE_VECTOR:
- return 2;
- case ValueBase::TYPE_COLOR:
- return 4;
- default:
- synfig::warning(string("ValueNode_RadialComposite::component_count():")+_("Bad type for radialcomposite"));
- return 1;
- }
-}
-
bool
ValueNode_RadialComposite::set_link_vfunc(int i,ValueNode::Handle x)
{
}
String
-ValueNode_RadialComposite::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(get_type())
- {
- case ValueBase::TYPE_VECTOR:
- if(i==0)
- return _("Radius");
- else if(i==1)
- return _("Theta");
- break;
-
- case ValueBase::TYPE_COLOR:
- if(i==0)
- return _("Luma");
- else if(i==1)
- return _("Saturation");
- else if(i==2)
- return _("Hue");
- else if(i==3)
- return _("Alpha");
- break;
-
- default:
- break;
- }
-
- assert(0);
- // notice that Composite counts from 1 and Radial Composite counts
- // from 0! we need to keep it like that to correctly load old
- // animations, but let's not save "c%d" format link names in future
- return etl::strprintf(_("C%d"),i);
-}
-
-
-String
ValueNode_RadialComposite::link_name(int i)const
{
assert(i>=0 && i<link_count());
if (get_file_version() < RELEASE_VERSION_0_61_08)
return strprintf("c%d",i);
- switch(get_type())
- {
- case ValueBase::TYPE_COLOR:
- switch(i)
- {
- case 0: return "y_luma"; // the 'luma' attribute is recognised by the fact that it starts with a 'y'
- case 1: return "saturation";
- case 2: return "hue";
- case 3: return "alpha";
- }
- break;
- case ValueBase::TYPE_VECTOR:
- switch(i)
- {
- case 0: return "radius";
- case 1: return "theta";
- }
- break;
- default:
- break;
- }
-
- assert(0);
- // notice that Composite counts from 1 and Radial Composite counts
- // from 0! we need to keep it like that to correctly load old
- // animations, but let's not save "c%d" format link names in future
- return strprintf("c%d",i);
+ return LinkableValueNode::link_name(i);
}
int
ValueNode_RadialComposite::get_link_index_from_name(const String &name)const
{
+ // Here we don't use the LinkableValueNode::get_link_index_from_name
+ // due to the particularities of the link index from name for old files.
+ // So we keep this alive to maintain old file compatibilities.
if(name.empty())
throw Exception::BadLinkName(name);
typedef etl::handle<ValueNode_RadialComposite> Handle;
typedef etl::handle<const ValueNode_RadialComposite> ConstHandle;
-
virtual ~ValueNode_RadialComposite();
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
virtual String link_name(int i)const;
- virtual String link_local_name(int i)const;
virtual ValueBase operator()(Time t)const;
-
-
virtual String get_name()const;
virtual String get_local_name()const;
virtual int get_link_index_from_name(const String &name)const;
}
}
-int
-ValueNode_Range::link_count()const
-{
- return 3;
-}
-
-String
-ValueNode_Range::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Min");
- case 1: return _("Max");
- case 2: return _("Link");
- default: return String();
- }
-}
-
-String
-ValueNode_Range::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "min";
- case 1: return "max";
- case 2: return "link";
- default: return String();
- }
-}
-
-int
-ValueNode_Range::get_link_index_from_name(const String &name)const
-{
- if(name=="min") return 0;
- if(name=="max") return 1;
- if(name=="link") return 2;
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_Range::get_name()const
{
ValueBase get_inverse(Time t, const synfig::Angle &target_value) const;
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
return 0;
}
-int
-ValueNode_RealString::link_count()const
-{
- return 4;
-}
-
-String
-ValueNode_RealString::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "real";
- case 1: return "width";
- case 2: return "precision";
- case 3: return "zero_pad";
- }
- return String();
-}
-
-String
-ValueNode_RealString::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Real");
- case 1: return _("Width");
- case 2: return _("Precision");
- case 3: return _("Zero Padded");
- }
- return String();
-}
-
-int
-ValueNode_RealString::get_link_index_from_name(const String &name)const
-{
- if (name=="real") return 0;
- if (name=="width") return 1;
- if (name=="precision") return 2;
- if (name=="zero_pad") return 3;
-
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_RealString::check_type(ValueBase::Type type)
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Reciprocal::link_count()const
-{
- return 3;
-}
-
-String
-ValueNode_Reciprocal::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return _("Link");
- if(i==1) return _("Epsilon");
- if(i==2) return _("Infinite");
- return String();
-}
-
-String
-ValueNode_Reciprocal::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "link";
- if(i==1) return "epsilon";
- if(i==2) return "infinite";
- return String();
-}
-
-int
-ValueNode_Reciprocal::get_link_index_from_name(const String &name)const
-{
- if(name=="link") return 0;
- if(name=="epsilon") return 1;
- if(name=="infinite") return 2;
-
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_Reciprocal::operator()(Time t)const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return link_;
}
-int
-ValueNode_Reference::link_count()const
-{
- return 1;
-}
-
-String
-ValueNode_Reference::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Link");
- }
- return String();
-}
-
-String
-ValueNode_Reference::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "link";
- }
- return String();
-}
-
-int
-ValueNode_Reference::get_link_index_from_name(const String &name)const
-{
- if(name=="link")
- return 0;
-
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_Reference::operator()(Time t)const
{
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
-
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
-
virtual ValueBase operator()(Time t)const;
virtual ~ValueNode_Reference();
}
}
-int
-ValueNode_Repeat_Gradient::link_count()const
-{
- return 7;
-}
-
-String
-ValueNode_Repeat_Gradient::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Gradient");
- case 1: return _("Count");
- case 2: return _("Width");
- case 3: return _("Specify Start");
- case 4: return _("Specify End");
- case 5: return _("Start Color");
- case 6: return _("End Color");
- default: return String();
- }
-}
-
-String
-ValueNode_Repeat_Gradient::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "gradient";
- case 1: return "count";
- case 2: return "width";
- case 3: return "specify_start";
- case 4: return "specify_end";
- case 5: return "start_color";
- case 6: return "end_color";
- default: return String();
- }
-}
-
-int
-ValueNode_Repeat_Gradient::get_link_index_from_name(const String &name)const
-{
- if(name=="gradient") return 0;
- if(name=="count") return 1;
- if(name=="width") return 2;
- if(name=="specify_start") return 3;
- if(name=="specify_end") return 4;
- if(name=="start_color") return 5;
- if(name=="end_color") return 6;
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_Repeat_Gradient::get_name()const
{
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
-
- virtual String link_local_name(int i)const;
- virtual String link_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
-
virtual ValueBase operator()(Time t)const;
virtual String get_name()const;
return 0;
}
-int
-ValueNode_Scale::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_Scale::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("Link");
- else if(i==1)
- return _("Scalar");
- return String();
-}
-
-String
-ValueNode_Scale::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "link";
- else if(i==1)
- return "scalar";
- return String();
-}
-
-int
-ValueNode_Scale::get_link_index_from_name(const String &name)const
-{
- if(name=="link")
- return 0;
- if(name=="scalar")
- return 1;
-
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_Scale::get_name()const
{
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
-
- virtual String link_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
-
virtual ValueBase operator()(Time t)const;
//! Returns the modified Link to match the target value at time t
virtual String get_local_name()const;
- virtual String link_local_name(int i)const;
-
protected:
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
return 0;
}
-int
-ValueNode_SegCalcTangent::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_SegCalcTangent::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "segment";
- if(i==1)
- return "amount";
- return String();
-}
-
-String
-ValueNode_SegCalcTangent::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("Segment");
- if(i==1)
- return _("Amount");
- return String();
-}
-
-int
-ValueNode_SegCalcTangent::get_link_index_from_name(const String &name)const
-{
- if(name=="segment")
- return 0;
- if(name=="amount")
- return 1;
-
- throw Exception::BadLinkName(name);
-}
-
LinkableValueNode*
ValueNode_SegCalcTangent::create_new()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
return 0;
}
-int
-ValueNode_SegCalcVertex::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_SegCalcVertex::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "segment";
- if(i==1)
- return "amount";
- return String();
-}
-
-String
-ValueNode_SegCalcVertex::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("Segment");
- if(i==1)
- return _("Amount");
- return String();
-}
-
-int
-ValueNode_SegCalcVertex::get_link_index_from_name(const String &name)const
-{
- if(name=="segment")
- return 0;
- if(name=="amount")
- return 1;
-
- throw Exception::BadLinkName(name);
-}
-
LinkableValueNode*
ValueNode_SegCalcVertex::create_new()const
{
typedef etl::handle<ValueNode_SegCalcVertex> Handle;
typedef etl::handle<const ValueNode_SegCalcVertex> ConstHandle;
-// static Handle create(const ValueBase::Type &x=ValueBase::TYPE_VECTOR);
-
-
virtual ValueBase operator()(Time t)const;
virtual ~ValueNode_SegCalcVertex();
virtual String get_name()const;
virtual String get_local_name()const;
-// static bool check_type(const ValueBase::Type &type);
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Sine::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_Sine::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "angle";
- if(i==1)
- return "amp";
- return String();
-}
-
-String
-ValueNode_Sine::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("Angle");
- if(i==1)
- return _("Amplitude");
- return String();
-}
-
-int
-ValueNode_Sine::get_link_index_from_name(const String &name)const
-{
- if(name=="angle")
- return 0;
- if(name=="amp")
- return 1;
-
- throw Exception::BadLinkName(name);
-}
-
LinkableValueNode::Vocab
ValueNode_Sine::get_children_vocab_vfunc()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
}
}
-int
-ValueNode_Step::link_count()const
-{
- return 4;
-}
-
-String
-ValueNode_Step::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "link";
- case 1: return "duration";
- case 2: return "start_time";
- case 3: return "intersection";
- default:
- return String();
- }
-}
-
-String
-ValueNode_Step::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Link");
- case 1: return _("Duration");
- case 2: return _("Start Time");
- case 3: return _("Intersection");
- default:
- return String();
- }
-}
-
-int
-ValueNode_Step::get_link_index_from_name(const String &name)const
-{
- if(name=="link") return 0;
- if(name=="duration") return 1;
- if(name=="start_time") return 2;
- if(name=="intersection") return 3;
-
- throw Exception::BadLinkName(name);
-}
-
LinkableValueNode::Vocab
ValueNode_Step::get_children_vocab_vfunc()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_Stripes::link_count()const
-{
- return 4;
-}
-
-String
-ValueNode_Stripes::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0:
- return _("Color 1");
- case 1:
- return _("Color 2");
- case 2:
- return _("Stripe Count");
- case 3:
- return _("Width");
- default:
- return String();
- }
-}
-
-String
-ValueNode_Stripes::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0:
- return "color1";
- case 1:
- return "color2";
- case 2:
- return "stripes";
- case 3:
- return "width";
- default:
- return String();
- }
-}
-
-int
-ValueNode_Stripes::get_link_index_from_name(const String &name)const
-{
- if(name=="color1")
- return 0;
- if(name=="color2")
- return 1;
- if(name=="stripes")
- return 2;
- if(name=="width")
- return 3;
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_Stripes::get_name()const
{
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
-
- virtual String link_local_name(int i)const;
- virtual String link_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
-
virtual ValueBase operator()(Time t)const;
virtual String get_name()const;
}
}
-int
-ValueNode_Subtract::link_count()const
-{
- return 3;
-}
-
-String
-ValueNode_Subtract::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("LHS");
- case 1: return _("RHS");
- case 2: return _("Scalar");
- default: return String();
- }
-}
-
-String
-ValueNode_Subtract::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "lhs";
- case 1: return "rhs";
- case 2: return "scalar";
- default: return String();
- }
-}
-
-int
-ValueNode_Subtract::get_link_index_from_name(const String &name)const
-{
- if(name=="lhs") return 0;
- if(name=="rhs") return 1;
- if(name=="scalar") return 2;
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_Subtract::get_name()const
{
virtual ValueBase operator()(Time t)const;
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_local_name(int i)const;
- virtual String link_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
virtual String get_name()const;
virtual String get_local_name()const;
static bool check_type(ValueBase::Type type);
return 0;
}
-int
-ValueNode_Switch::link_count()const
-{
- return 3;
-}
-
-String
-ValueNode_Switch::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "link_off";
- case 1: return "link_on";
- case 2: return "switch";
- }
- return String();
-}
-
-String
-ValueNode_Switch::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "Link Off";
- case 1: return "Link On";
- case 2: return "Switch";
- }
- return String();
-}
-
-int
-ValueNode_Switch::get_link_index_from_name(const String &name)const
-{
- if(name=="link_off") return 0;
- if(name=="link_on" ) return 1;
- if(name=="switch" ) return 2;
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_Switch::operator()(Time t)const
{
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
-
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
-
virtual ValueBase operator()(Time t)const;
virtual ~ValueNode_Switch();
return 0;
}
-int
-ValueNode_TimedSwap::link_count()const
-{
- return 4;
-}
-
-String
-ValueNode_TimedSwap::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Before");
- case 1: return _("After");
- case 2: return _("Swap Time");
- case 3: return _("Swap Duration");
- default:return String();
- }
-}
-
-String
-ValueNode_TimedSwap::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "before";
- case 1: return "after";
- case 2: return "time";
- case 3: return "length";
- default:return String();
- }
-}
-
-int
-ValueNode_TimedSwap::get_link_index_from_name(const String &name)const
-{
- if(name=="before") return 0;
- if(name=="after") return 1;
- if(name=="time") return 2;
- if(name=="length") return 3;
-
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_TimedSwap::get_name()const
{
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_local_name(int i)const;
- virtual String link_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
virtual ValueBase operator()(Time t)const;
return 0;
}
-int
-ValueNode_TimeLoop::link_count()const
-{
- return 4;
-}
-
-String
-ValueNode_TimeLoop::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return _("Link");
- if(i==1) return _("Link Time");
- if(i==2) return _("Local Time");
- if(i==3) return _("Duration");
- return String();
-}
-
-String
-ValueNode_TimeLoop::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0) return "link";
- if(i==1) return "link_time";
- if(i==2) return "local_time";
- if(i==3) return "duration";
- return String();
-}
-
-int
-ValueNode_TimeLoop::get_link_index_from_name(const String &name)const
-{
- if(name=="link") return 0;
- if(name=="link_time") return 1;
- if(name=="local_time") return 2;
- if(name=="duration") return 3;
-
- throw Exception::BadLinkName(name);
-}
-
ValueBase
ValueNode_TimeLoop::operator()(Time t)const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_TimeString::link_count()const
-{
- return 1;
-}
-
-String
-ValueNode_TimeString::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "time";
- }
- return String();
-}
-
-String
-ValueNode_TimeString::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Time");
- }
- return String();
-}
-
-int
-ValueNode_TimeString::get_link_index_from_name(const String &name)const
-{
- if (name=="time") return 0;
-
- throw Exception::BadLinkName(name);
-}
-
bool
ValueNode_TimeString::check_type(ValueBase::Type type)
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_TwoTone::link_count()const
-{
- return 2;
-}
-
-String
-ValueNode_TwoTone::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0:
- return _("Color1");
- case 1:
- return _("Color2");
- default:
- return String();
- }
-}
-
-String
-ValueNode_TwoTone::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0:
- return "color1";
- case 1:
- return "color2";
- default:
- return String();
- }
-}
-
-int
-ValueNode_TwoTone::get_link_index_from_name(const String &name)const
-{
- if(name=="color1")
- return 0;
- if(name=="color2")
- return 1;
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_TwoTone::get_name()const
{
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
-
- virtual String link_local_name(int i)const;
- virtual String link_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
-
virtual ValueBase operator()(Time t)const;
virtual String get_name()const;
return 0;
}
-int
-ValueNode_VectorAngle::link_count()const
-{
- return 1;
-}
-
-String
-ValueNode_VectorAngle::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("Vector");
- return String();
-}
-
-String
-ValueNode_VectorAngle::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "vector";
- return String();
-}
-
-int
-ValueNode_VectorAngle::get_link_index_from_name(const String &name)const
-{
- if(name=="vector")
- return 0;
-
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_VectorAngle::get_name()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_VectorLength::link_count()const
-{
- return 1;
-}
-
-String
-ValueNode_VectorLength::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("Vector");
- return String();
-}
-
-String
-ValueNode_VectorLength::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "vector";
- return String();
-}
-
-int
-ValueNode_VectorLength::get_link_index_from_name(const String &name)const
-{
- if(name=="vector")
- return 0;
-
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_VectorLength::get_name()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_VectorX::link_count()const
-{
- return 1;
-}
-
-String
-ValueNode_VectorX::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("Vector");
- return String();
-}
-
-String
-ValueNode_VectorX::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "vector";
- return String();
-}
-
-int
-ValueNode_VectorX::get_link_index_from_name(const String &name)const
-{
- if(name=="vector")
- return 0;
-
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_VectorX::get_name()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;
return 0;
}
-int
-ValueNode_VectorY::link_count()const
-{
- return 1;
-}
-
-String
-ValueNode_VectorY::link_local_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return _("Vector");
- return String();
-}
-
-String
-ValueNode_VectorY::link_name(int i)const
-{
- assert(i>=0 && i<link_count());
-
- if(i==0)
- return "vector";
- return String();
-}
-
-int
-ValueNode_VectorY::get_link_index_from_name(const String &name)const
-{
- if(name=="vector")
- return 0;
-
- throw Exception::BadLinkName(name);
-}
-
String
ValueNode_VectorY::get_name()const
{
virtual String get_name()const;
virtual String get_local_name()const;
-
virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
- virtual int link_count()const;
- virtual String link_name(int i)const;
-
- virtual String link_local_name(int i)const;
- virtual int get_link_index_from_name(const String &name)const;
protected:
LinkableValueNode* create_new()const;