| 171 | } |
| 172 | |
| 173 | void Settings::clearAllFields() |
| 174 | { |
| 175 | // Fetch Dynamic-Field Dictionary. |
| 176 | SimFieldDictionary* pFieldDictionary = getFieldDictionary(); |
| 177 | |
| 178 | // Any Field Dictionary? |
| 179 | if ( pFieldDictionary == NULL ) |
| 180 | { |
| 181 | // No, so we're done. |
| 182 | return; |
| 183 | } |
| 184 | |
| 185 | // Iterate fields. |
| 186 | for ( SimFieldDictionaryIterator itr(pFieldDictionary); *itr; ++itr ) |
| 187 | { |
| 188 | // Fetch Field Entry. |
| 189 | SimFieldDictionary::Entry* fieldEntry = *itr; |
| 190 | |
| 191 | // don't remove default field values |
| 192 | if (dStrEndsWith(fieldEntry->slotName, "_default")) |
| 193 | continue; |
| 194 | |
| 195 | // remove it. |
| 196 | pFieldDictionary->setFieldValue( fieldEntry->slotName, "" ); |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | bool Settings::write() |
| 201 | { |
nothing calls this directly
no test coverage detected