40 #include "EST_Features.h"
41 #include "ling_class/EST_Item.h"
42 #include "EST_error.h"
43 #include "EST_String.h"
44 #include "EST_Token.h"
61 *features = *f.features;
64 EST_Features::~EST_Features()
79 for (p=features->
list.head(); p; p=p->next())
81 if (features->
list(p).k == name)
82 return features->
list(p).v;
93 for (p=features->
list.head(); p; p=p->next())
95 if (features->
list(p).k == name)
96 return features->
list(p).v;
99 EST_error(
"{FND} Feature %s not defined\n", name);
100 return feature_default_value;
107 if (strchr(name,
'.') == NULL)
114 if (v.
type() == val_type_feats)
115 return feats(v)->val_path(nname.
after(
"."), d);
125 if (strchr(name,
'.') == NULL)
132 if (v.
type() == val_type_feats)
133 return feats(v)->val_path(nname.
after(
"."));
135 EST_error(
"Feature %s not feature valued\n", (
const char *)fname);
136 return feature_default_value;
144 return *feats(
val(path,est_val(ff)));
149 if (strchr(name,
'.') == NULL)
150 return features->
present(name);
155 if (v.
type() == val_type_feats)
156 return feats(v)->present(nname.
after(
"."));
168 if (strchr(name,
'.') == NULL)
177 if (v.
type() == val_type_feats)
178 feats(v)->set_path(nname.
after(
"."),sval);
180 EST_error(
"Feature %s not feature valued\n",
181 (
const char *)fname);
194 *features = *x.features;
202 for(p.
begin(from); p; ++p)
210 return "<<Features>>";
213 #if defined(INSTANTIATE_TEMPLATES)
216 Instantiate_TIterator_T(
EST_Features, EST_Features::IPointer, EST_Features_Entry, Features_itt)