]>
Commit | Line | Data |
---|---|---|
59b2d47f | 1 | /* |
b8ae064d | 2 | * Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
59b2d47f | 3 | * |
bbc27441 AJ |
4 | * Squid software is distributed under GPLv2+ license and includes |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
59b2d47f | 7 | */ |
8 | ||
bbc27441 AJ |
9 | /* DEBUG: section 03 Configuration File Parsing */ |
10 | ||
582c2af2 | 11 | #include "squid.h" |
b9ae18aa | 12 | #include "ConfigOption.h" |
59b2d47f | 13 | |
b9ae18aa | 14 | ConfigOptionVector::~ConfigOptionVector() |
15 | { | |
385acf91 | 16 | while (!options.empty()) { |
b9ae18aa | 17 | delete options.back(); |
18 | options.pop_back(); | |
19 | } | |
20 | } | |
59b2d47f | 21 | |
b9ae18aa | 22 | bool |
350e2aec | 23 | ConfigOptionVector::parse(char const *option, const char *value, int isaReconfig) |
59b2d47f | 24 | { |
c8ea3cc0 | 25 | std::vector<ConfigOption *>::iterator i = options.begin(); |
59b2d47f | 26 | |
b9ae18aa | 27 | while (i != options.end()) { |
350e2aec | 28 | if ((*i)->parse(option,value, isaReconfig)) |
b9ae18aa | 29 | return true; |
59b2d47f | 30 | |
b9ae18aa | 31 | ++i; |
32 | } | |
59b2d47f | 33 | |
b9ae18aa | 34 | return false; |
35 | } | |
59b2d47f | 36 | |
b9ae18aa | 37 | void |
38 | ConfigOptionVector::dump(StoreEntry * e) const | |
39 | { | |
c8ea3cc0 | 40 | for (std::vector<ConfigOption *>::const_iterator i = options.begin(); |
b9ae18aa | 41 | i != options.end(); ++i) |
42 | (*i)->dump(e); | |
43 | } | |
f53969cc | 44 |