template <class T>
bool
-optParamIn(CheckpointIn &cp, const string &name, T ¶m)
+optParamIn(CheckpointIn &cp, const string &name, T ¶m, bool warn)
{
const string §ion(Serializable::currentSection());
string str;
if (!cp.find(section, name, str) || !parseParam(str, param)) {
- warn("optional parameter %s:%s not present\n", section, name);
+ if (warn)
+ warn("optional parameter %s:%s not present\n", section, name);
return false;
} else {
return true;
template void \
paramIn(CheckpointIn &cp, const string &name, type & param); \
template bool \
- optParamIn(CheckpointIn &cp, const string &name, type & param); \
+ optParamIn(CheckpointIn &cp, const string &name, type & param, \
+ bool warn); \
template void \
arrayParamOut(CheckpointOut &os, const string &name, \
type const *param, unsigned size); \
}
template <class T>
-bool optParamIn(CheckpointIn &cp, const std::string &name, T ¶m);
+bool optParamIn(CheckpointIn &cp, const std::string &name, T ¶m,
+ bool warn = true);
template <typename DataType, typename BitUnion>
bool optParamIn(CheckpointIn &cp, const std::string &name,
- BitfieldBackend::BitUnionOperators<DataType, BitUnion> &p)
+ BitfieldBackend::BitUnionOperators<DataType, BitUnion> &p,
+ bool warn = true)
{
- return optParamIn(cp, name, p.__data);
+ return optParamIn(cp, name, p.__data, warn);
}
template <class T>