| 317 | |
| 318 | template <typename StructureType, typename FieldType> |
| 319 | void readPrefs( |
| 320 | StructureType* structure, const wxString& prefix, |
| 321 | const PrefsTableEntry<StructureType, FieldType>* fields, size_t numFields) |
| 322 | { |
| 323 | for (size_t ii = 0; ii < numFields; ++ii) |
| 324 | { |
| 325 | const PrefsTableEntry<StructureType, FieldType>& entry = fields[ii]; |
| 326 | gPrefs->Read( |
| 327 | prefix + entry.name, &(structure->*(entry.field)), entry.defaultValue); |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | template <typename StructureType, typename FieldType> |
| 332 | void writePrefs( |