203a204,208
> template <class T>
> void
> arrayParamOut(ostream &os, const string &name, const list<T> &param)
> {
> typename list<T>::const_iterator it = param.begin();
204a210,221
> os << name << "=";
> if (param.size() > 0)
> showParam(os, *it);
> it++;
> while (it != param.end()) {
> os << " ";
> showParam(os, *it);
> it++;
> }
> os << "\n";
> }
>
328a346
> template <class T>
329a348,377
> arrayParamIn(Checkpoint *cp, const string &section,
> const string &name, list<T> &param)
> {
> string str;
> if (!cp->find(section, name, str)) {
> fatal("Can't unserialize '%s:%s'\n", section, name);
> }
> param.clear();
>
> vector<string> tokens;
> tokenize(tokens, str, ' ');
>
> for (vector<string>::size_type i = 0; i < tokens.size(); i++) {
> T scalar_value = 0;
> if (!parseParam(tokens[i], scalar_value)) {
> string err("could not parse \"");
>
> err += str;
> err += "\"";
>
> fatal(err);
> }
>
> // assign parsed value to vector
> param.push_back(scalar_value);
> }
> }
>
>
> void
359c407,413
< const string &name, vector<type> &param);
---
> const string &name, vector<type> &param); \
> template void \
> arrayParamOut(ostream &os, const string &name, \
> const list<type> &param); \
> template void \
> arrayParamIn(Checkpoint *cp, const string &section, \
> const string &name, list<type> &param);