Module: synfig/synfig
Branch: master
Commit: c318e91118d00d944b39c88eb6a34f6c6a89489e
URL:    
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig/synfig;a=commit;h=c318e91118d00d944b39c88eb6a34f6c6a89489e

Author: Carlos Lopez <[email protected]>
Date:   Mon Dec 13 21:11:57 2010 +0100

Make link_name(), link_local_name, and get_link_index_from_name non pure 
virtual functions

---

 synfig-core/src/synfig/valuenode.cpp |   30 ++++++++++++++++++++++++++++++
 synfig-core/src/synfig/valuenode.h   |    6 +++---
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/synfig-core/src/synfig/valuenode.cpp 
b/synfig-core/src/synfig/valuenode.cpp
index b423afc..a47394e 100644
--- a/synfig-core/src/synfig/valuenode.cpp
+++ b/synfig-core/src/synfig/valuenode.cpp
@@ -669,3 +669,33 @@ LinkableValueNode::get_description(int index, bool 
show_exported_name)const
        return description;
 }
 
+String
+LinkableValueNode::link_name(int i)const
+{
+       Vocab vocab(get_param_vocab());
+       Vocab::iterator iter(vocab.begin());
+       int j=0;
+       for(; iter!=vocab.end(), j<i; iter++, j++);
+       return iter!=vocab.end()?iter->get_name():String();
+}
+
+String
+LinkableValueNode::link_local_name(int i)const
+{
+       Vocab vocab(get_param_vocab());
+       Vocab::iterator iter(vocab.begin());
+       int j=0;
+       for(; iter!=vocab.end(), j<i; iter++, j++);
+       return iter!=vocab.end()?iter->get_local_name():String();
+}
+
+int
+LinkableValueNode::get_link_index_from_name(const String &name)const
+{
+       Vocab vocab(get_param_vocab());
+       Vocab::iterator iter(vocab.begin());
+       int j=0;
+       for(; iter!=vocab.end(); iter++, j++)
+               if(iter->get_name()==name) return j;
+       throw Exception::BadLinkName(name);
+}
diff --git a/synfig-core/src/synfig/valuenode.h 
b/synfig-core/src/synfig/valuenode.h
index 61b5d6a..8a1552e 100644
--- a/synfig-core/src/synfig/valuenode.h
+++ b/synfig-core/src/synfig/valuenode.h
@@ -373,13 +373,13 @@ public:
        virtual int link_count()const=0;
 
        //! Returns the local name of the 'i' linked Value Node
-       virtual String link_local_name(int i)const=0;
+       virtual String link_local_name(int i)const;
 
        //! Returns the name of the 'i' linked Value Node
-       virtual String link_name(int i)const=0;
+       virtual String link_name(int i)const;
 
        //! Returns the child index Value Node based on the name
-       virtual int get_link_index_from_name(const String &name)const=0;
+       virtual int get_link_index_from_name(const String &name)const;
 
        //! Clones a Value Node
        virtual ValueNode* clone(const GUID& deriv_guid=GUID())const;


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to