ValueNode_TimeString::ValueNode_TimeString(const ValueBase &value):
LinkableValueNode(value.get_type())
{
+ Vocab ret(get_children_vocab());
+ set_children_vocab(ret);
switch(value.get_type())
{
case ValueBase::TYPE_STRING:
default:
throw Exception::BadType(ValueBase::type_local_name(value.get_type()));
}
-
- DCAST_HACK_ENABLE();
}
LinkableValueNode*
return 0;
}
-int
-ValueNode_TimeString::link_count()const
-{
- return 1;
-}
-
-String
-ValueNode_TimeString::link_name(int i)const
+bool
+ValueNode_TimeString::check_type(ValueBase::Type type)
{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return "time";
- }
- return String();
+ return
+ type==ValueBase::TYPE_STRING;
}
-String
-ValueNode_TimeString::link_local_name(int i)const
+LinkableValueNode::Vocab
+ValueNode_TimeString::get_children_vocab_vfunc()const
{
- assert(i>=0 && i<link_count());
-
- switch(i)
- {
- case 0: return _("Time");
- }
- return String();
-}
+ if(children_vocab.size())
+ return children_vocab;
-int
-ValueNode_TimeString::get_link_index_from_name(const String &name)const
-{
- if (name=="time") return 0;
+ LinkableValueNode::Vocab ret;
- throw Exception::BadLinkName(name);
-}
+ ret.push_back(ParamDesc(ValueBase(),"time")
+ .set_local_name(_("Time"))
+ .set_description(_("The time that is converted to string"))
+ );
-bool
-ValueNode_TimeString::check_type(ValueBase::Type type)
-{
- return
- type==ValueBase::TYPE_STRING;
+ return ret;
}