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);
+}
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;