From: Carlos Lopez Date: Tue, 21 Dec 2010 15:02:46 +0000 (+0100) Subject: Rename get_param_vocab to get_children_vocab and use a wrapper for the pure virtual... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d4cb326591ea23f82d341eb368b3d183b46f56c7;p=synfig.git Rename get_param_vocab to get_children_vocab and use a wrapper for the pure virtual get_children_vocab_vfunc member --- diff --git a/synfig-core/src/modules/mod_noise/valuenode_random.cpp b/synfig-core/src/modules/mod_noise/valuenode_random.cpp index 70c9ecd..22d6666 100644 --- a/synfig-core/src/modules/mod_noise/valuenode_random.cpp +++ b/synfig-core/src/modules/mod_noise/valuenode_random.cpp @@ -302,7 +302,7 @@ ValueNode_Random::randomize_seed() } LinkableValueNode::Vocab -ValueNode_Random::get_param_vocab()const +ValueNode_Random::get_children_vocab_vfunc()const { LinkableValueNode::Vocab ret; diff --git a/synfig-core/src/modules/mod_noise/valuenode_random.h b/synfig-core/src/modules/mod_noise/valuenode_random.h index 2732dc8..021c0cc 100644 --- a/synfig-core/src/modules/mod_noise/valuenode_random.h +++ b/synfig-core/src/modules/mod_noise/valuenode_random.h @@ -82,7 +82,7 @@ public: using synfig::LinkableValueNode::set_link_vfunc; static bool check_type(ValueBase::Type type); static ValueNode_Random* create(const ValueBase &x); - virtual Vocab get_param_vocab()const; + virtual Vocab get_children_vocab_vfunc()const; }; // END of class ValueNode_Random }; // END of namespace synfig diff --git a/synfig-core/src/synfig/valuenode.cpp b/synfig-core/src/synfig/valuenode.cpp index a47394e..1ff921e 100644 --- a/synfig-core/src/synfig/valuenode.cpp +++ b/synfig-core/src/synfig/valuenode.cpp @@ -672,7 +672,7 @@ LinkableValueNode::get_description(int index, bool show_exported_name)const String LinkableValueNode::link_name(int i)const { - Vocab vocab(get_param_vocab()); + Vocab vocab(get_children_vocab()); Vocab::iterator iter(vocab.begin()); int j=0; for(; iter!=vocab.end(), jget_name()==name) return j; throw Exception::BadLinkName(name); } + +LinkableValueNode::Vocab +LinkableValueNode::get_children_vocab()const +{ + return get_children_vocab_vfunc(); +} diff --git a/synfig-core/src/synfig/valuenode.h b/synfig-core/src/synfig/valuenode.h index 8a1552e..7fde918 100644 --- a/synfig-core/src/synfig/valuenode.h +++ b/synfig-core/src/synfig/valuenode.h @@ -396,8 +396,8 @@ public: //! Return a full description of the linked ValueNode given by the index String get_description(int index = -1, bool show_exported_name = true)const; - //! Gets the parameter vocabulary for linkable value nodes - virtual Vocab get_param_vocab()const=0; + //! Gets the children vocabulary for linkable value nodes + virtual Vocab get_children_vocab()const; protected: //! Sets the type of the ValueNode @@ -411,6 +411,9 @@ protected: //! Returns the cached times values for all the children (linked Value Nodes) virtual void get_times_vfunc(Node::time_set &set) const; + + //! Pure Virtual member to get the children vocabulary + virtual Vocab get_children_vocab_vfunc()const=0; }; // END of class LinkableValueNode /*! \class ValueNodeList diff --git a/synfig-core/src/synfig/valuenode_add.cpp b/synfig-core/src/synfig/valuenode_add.cpp index a45d2c5..901f899 100644 --- a/synfig-core/src/synfig/valuenode_add.cpp +++ b/synfig-core/src/synfig/valuenode_add.cpp @@ -206,7 +206,7 @@ ValueNode_Add::check_type(ValueBase::Type type) } LinkableValueNode::Vocab -ValueNode_Add::get_param_vocab() const +ValueNode_Add::get_children_vocab_vfunc() const { LinkableValueNode::Vocab ret; diff --git a/synfig-core/src/synfig/valuenode_add.h b/synfig-core/src/synfig/valuenode_add.h index ee0c5cd..19fa300 100644 --- a/synfig-core/src/synfig/valuenode_add.h +++ b/synfig-core/src/synfig/valuenode_add.h @@ -60,7 +60,7 @@ public: virtual String get_name()const; virtual String get_local_name()const; static bool check_type(ValueBase::Type type); - virtual Vocab get_param_vocab()const; + virtual Vocab get_children_vocab_vfunc()const; }; // END of class ValueNode_Add }; // END of namespace synfig diff --git a/synfig-core/src/synfig/valuenode_and.cpp b/synfig-core/src/synfig/valuenode_and.cpp index cae2beb..d2f9e46 100644 --- a/synfig-core/src/synfig/valuenode_and.cpp +++ b/synfig-core/src/synfig/valuenode_and.cpp @@ -139,7 +139,7 @@ ValueNode_And::check_type(ValueBase::Type type) } LinkableValueNode::Vocab -ValueNode_And::get_param_vocab() const +ValueNode_And::get_children_vocab_vfunc() const { LinkableValueNode::Vocab ret; diff --git a/synfig-core/src/synfig/valuenode_and.h b/synfig-core/src/synfig/valuenode_and.h index fb09e9a..f80d408 100644 --- a/synfig-core/src/synfig/valuenode_and.h +++ b/synfig-core/src/synfig/valuenode_and.h @@ -62,7 +62,7 @@ public: using synfig::LinkableValueNode::set_link_vfunc; static bool check_type(ValueBase::Type type); static ValueNode_And* create(const ValueBase &x); - virtual LinkableValueNode::Vocab get_param_vocab()const; + virtual LinkableValueNode::Vocab get_children_vocab_vfunc()const; }; // END of class ValueNode_And }; // END of namespace synfig diff --git a/synfig-core/src/synfig/valuenode_anglestring.cpp b/synfig-core/src/synfig/valuenode_anglestring.cpp index f18621b..7dbb73c 100644 --- a/synfig-core/src/synfig/valuenode_anglestring.cpp +++ b/synfig-core/src/synfig/valuenode_anglestring.cpp @@ -168,7 +168,7 @@ ValueNode_AngleString::check_type(ValueBase::Type type) } LinkableValueNode::Vocab -ValueNode_AngleString::get_param_vocab()const +ValueNode_AngleString::get_children_vocab_vfunc()const { LinkableValueNode::Vocab ret; diff --git a/synfig-core/src/synfig/valuenode_anglestring.h b/synfig-core/src/synfig/valuenode_anglestring.h index 2051672..30fa303 100644 --- a/synfig-core/src/synfig/valuenode_anglestring.h +++ b/synfig-core/src/synfig/valuenode_anglestring.h @@ -66,7 +66,7 @@ public: using synfig::LinkableValueNode::set_link_vfunc; static bool check_type(ValueBase::Type type); static ValueNode_AngleString* create(const ValueBase &x); - virtual Vocab get_param_vocab()const; + virtual Vocab get_children_vocab_vfunc()const; }; // END of class ValueNode_AngleString }; // END of namespace synfig diff --git a/synfig-core/src/synfig/valuenode_atan2.cpp b/synfig-core/src/synfig/valuenode_atan2.cpp index 844fbad..ceec7a7 100644 --- a/synfig-core/src/synfig/valuenode_atan2.cpp +++ b/synfig-core/src/synfig/valuenode_atan2.cpp @@ -178,7 +178,7 @@ ValueNode_Atan2::get_link_index_from_name(const String &name)const } LinkableValueNode::Vocab -ValueNode_Atan2::get_param_vocab()const +ValueNode_Atan2::get_children_vocab_vfunc()const { LinkableValueNode::Vocab ret; diff --git a/synfig-core/src/synfig/valuenode_atan2.h b/synfig-core/src/synfig/valuenode_atan2.h index 2bef724..845883c 100644 --- a/synfig-core/src/synfig/valuenode_atan2.h +++ b/synfig-core/src/synfig/valuenode_atan2.h @@ -74,7 +74,7 @@ public: using synfig::LinkableValueNode::set_link_vfunc; static bool check_type(ValueBase::Type type); static ValueNode_Atan2* create(const ValueBase &x); - virtual Vocab get_param_vocab()const; + virtual Vocab get_children_vocab_vfunc()const; }; // END of class ValueNode_Atan2 }; // END of namespace synfig diff --git a/synfig-core/src/synfig/valuenode_bline.cpp b/synfig-core/src/synfig/valuenode_bline.cpp index 2131bf5..c84db97 100644 --- a/synfig-core/src/synfig/valuenode_bline.cpp +++ b/synfig-core/src/synfig/valuenode_bline.cpp @@ -845,7 +845,7 @@ ValueNode_BLine::check_type(ValueBase::Type type) } LinkableValueNode::Vocab -ValueNode_BLine::get_param_vocab()const +ValueNode_BLine::get_children_vocab_vfunc()const { LinkableValueNode::Vocab ret; for(unsigned int i=0; ilink_count(); - LinkableValueNode::Vocab vocab(linkable->get_param_vocab()); + LinkableValueNode::Vocab vocab(linkable->get_children_vocab()); LinkableValueNode::Vocab::iterator iter(vocab.begin()); for(int i=0;ilink_count();i++, iter++) {