]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ConfigOption.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / ConfigOption.cc
1 /*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9 /* DEBUG: section 03 Configuration File Parsing */
10
11 #include "squid.h"
12 #include "ConfigOption.h"
13
14 ConfigOptionVector::~ConfigOptionVector()
15 {
16 while (!options.empty()) {
17 delete options.back();
18 options.pop_back();
19 }
20 }
21
22 bool
23 ConfigOptionVector::parse(char const *option, const char *value, int isaReconfig)
24 {
25 std::vector<ConfigOption *>::iterator i = options.begin();
26
27 while (i != options.end()) {
28 if ((*i)->parse(option,value, isaReconfig))
29 return true;
30
31 ++i;
32 }
33
34 return false;
35 }
36
37 void
38 ConfigOptionVector::dump(StoreEntry * e) const
39 {
40 for (std::vector<ConfigOption *>::const_iterator i = options.begin();
41 i != options.end(); ++i)
42 (*i)->dump(e);
43 }
44