46 #include "../base_class/EST_get_function_template.h" 56 const EST_String
name,
60 if (f.relations.length() == 0)
61 return getValI(f, name, def, s);
65 p = f.relations.head();
66 EST_Item *i = item(f.relations.list(p).v);
67 return getVal(*i, name, def, s);
78 return getStringI(f, name, def, s);
94 return getIntegerI(f, name, def, s);
110 return getFloatI(f, name, def, s);
128 v =
getFloat(item_content,
"start", -1.0, status);
148 v =
getFloat(item_content,
"mid", -1.0, status);
151 v = (
start(item_content)+
end(item_content))/2.0;
171 v =
getFloat(item_content,
"time", -1.0, status);
174 v =
mid(item_content);
194 v =
getFloat(item_content,
"end", -1.0, status);
const EST_String name(void)
defineGetFunction(EST_Item_Content, f.val, EST_Val, getValI) defineGetFunction(EST_Item_Content
float start(const EST_Item_Content &item_content)
int getInteger(const EST_Item_Content &f, const EST_String name, const int &def, EST_feat_status &s)
EST_TKVL< EST_String, EST_Val > relations
float time(const EST_Item_Content &item_content)
float end(const EST_Item_Content &item_content)
float mid(const EST_Item_Content &item_content)
EST_TList< EST_TKVI< K, V > > list
Linked list of key-val pairs. Don't use this as it will be made private in the future.
EST_Litem * head() const
Return First key value pair in list.
EST_String getString(const EST_Item_Content &f, const EST_String name, const EST_String &def, EST_feat_status &s)
Return the value as a string.
float getFloat(const EST_Item_Content &f, const EST_String name, const float &def, EST_feat_status &s)
Return the values as a float.
int length() const
number of key value pairs in list
f getStringI f getIntegerI EST_Val getVal(const EST_Item_Content &f, const EST_String name, const EST_Val &def, EST_feat_status &s)
Return the value as an EST_Val.