214a215,232
> arrayParamOut(CheckpointOut &os, const string &name, const set<T> &param)
> {
> typename set<T>::const_iterator it = param.begin();
>
> os << name << "=";
> if (param.size() > 0)
> showParam(os, *it);
> it++;
> while (it != param.end()) {
> os << " ";
> showParam(os, *it);
> it++;
> }
> os << "\n";
> }
>
> template <class T>
> void
370a389,398
> template <class T>
> void
> arrayParamIn(CheckpointIn &cp, const string &name, set<T> &param)
> {
> const string &section(Serializable::currentSection());
> string str;
> if (!cp.find(section, name, str)) {
> fatal("Can't unserialize '%s:%s'\n", section, name);
> }
> param.clear();
371a400,419
> vector<string> tokens;
> tokenize(tokens, str, ' ');
>
> for (vector<string>::size_type i = 0; i < tokens.size(); i++) {
> T scalar_value;
> if (!parseParam(tokens[i], scalar_value)) {
> string err("could not parse \"");
>
> err += str;
> err += "\"";
>
> fatal(err);
> }
>
> // assign parsed value to vector
> param.insert(scalar_value);
> }
> }
>
>
425a474,478
> // set is only used with strings and furthermore doesn't agree with Pixel
> template void
> arrayParamOut(CheckpointOut &, const string &, const set<string> &);
> template void
> arrayParamIn(CheckpointIn &, const string &, set<string> &);