| 177 | } |
| 178 | |
| 179 | ConfigProto* Config::combined() |
| 180 | { |
| 181 | if (!_configValid) |
| 182 | { |
| 183 | _combinedConfig = _baseConfig; |
| 184 | |
| 185 | for (const auto& optionInfo : _appliedOptions) |
| 186 | _combinedConfig.MergeFrom(optionInfo.option->config()); |
| 187 | |
| 188 | /* Add in the user overrides. */ |
| 189 | |
| 190 | _combinedConfig.MergeFrom(_overridesConfig); |
| 191 | |
| 192 | /* At this point the config is valid, although when fluxsources or |
| 193 | * imagereaders are loaded it may be adjusted again. */ |
| 194 | |
| 195 | _configValid = true; |
| 196 | } |
| 197 | return &_combinedConfig; |
| 198 | } |
| 199 | |
| 200 | void Config::invalidate() |
| 201 | { |