Deleted Added
sdiff udiff text old ( 7864:494b5426e70d ) new ( 7948:20da8e9ed59f )
full compact
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 187 unchanged lines hidden (view full) ---

196 showParam(os, param[0]);
197 for (typename vector<T>::size_type i = 1; i < size; ++i) {
198 os << " ";
199 showParam(os, param[i]);
200 }
201 os << "\n";
202}
203
204
205template <class T>
206void
207paramIn(Checkpoint *cp, const string &section, const string &name, T &param)
208{
209 string str;
210 if (!cp->find(section, name, str) || !parseParam(str, param)) {
211 fatal("Can't unserialize '%s:%s'\n", section, name);
212 }

--- 108 unchanged lines hidden (view full) ---

321 fatal(err);
322 }
323
324 // assign parsed value to vector
325 param[i] = scalar_value;
326 }
327}
328
329void
330objParamIn(Checkpoint *cp, const string &section,
331 const string &name, SimObject * &param)
332{
333 if (!cp->findObj(section, name, param)) {
334 fatal("Can't unserialize '%s:%s'\n", section, name);
335 }
336}
337

--- 13 unchanged lines hidden (view full) ---

351template void \
352arrayParamIn(Checkpoint *cp, const string &section, \
353 const string &name, type *param, unsigned size); \
354template void \
355arrayParamOut(ostream &os, const string &name, \
356 const vector<type> &param); \
357template void \
358arrayParamIn(Checkpoint *cp, const string &section, \
359 const string &name, vector ¶m);
360
361INSTANTIATE_PARAM_TEMPLATES(char)
362INSTANTIATE_PARAM_TEMPLATES(signed char)
363INSTANTIATE_PARAM_TEMPLATES(unsigned char)
364INSTANTIATE_PARAM_TEMPLATES(signed short)
365INSTANTIATE_PARAM_TEMPLATES(unsigned short)
366INSTANTIATE_PARAM_TEMPLATES(signed int)
367INSTANTIATE_PARAM_TEMPLATES(unsigned int)

--- 222 unchanged lines hidden ---