Load Filter from configuration file. Second parameter would be version number if format changes in future to include more fields. Then new fields would have to be loaded conditionally
| 226 | //! number if format changes in future to include more fields. Then new |
| 227 | //! fields would have to be loaded conditionally |
| 228 | void load(JsonArchive& ar, const unsigned int) |
| 229 | { |
| 230 | ar >> NVP(categoryText_) |
| 231 | >> NVP(pluginText_) |
| 232 | >> NVP(enabled_) |
| 233 | >> NVP(level_); |
| 234 | TRACE(filter) << "Loading filter cat: " << categoryText_ |
| 235 | << " plug: " << pluginText_ |
| 236 | << " ena " << enabled_ |
| 237 | << " level: " << level_ |
| 238 | << std::endl; |
| 239 | persistent_ = true; |
| 240 | matches_ = 0; |
| 241 | category_ = std::regex{categoryText_}; |
| 242 | plugin_ = std::regex{pluginText_}; |
| 243 | } |
| 244 | |
| 245 | //! Save the Filter to json configuration file |
| 246 | void save(JsonArchive& ar, const unsigned int) const |
no outgoing calls
no test coverage detected