]> git.ipfire.org Git - thirdparty/squid.git/blame - src/ConfigOption.cc
Prep for 3.3.12 and 3.4.4
[thirdparty/squid.git] / src / ConfigOption.cc
CommitLineData
59b2d47f 1/*
b510f3a1 2 * DEBUG: section 03 Configuration File Parsing
b9ae18aa 3 * AUTHOR: Robert Collins
59b2d47f 4 *
5 * SQUID Web Proxy Cache http://www.squid-cache.org/
6 * ----------------------------------------------------------
7 *
8 * Squid is the result of efforts by numerous individuals from
9 * the Internet community; see the CONTRIBUTORS file for full
10 * details. Many organizations have provided support for Squid's
11 * development; see the SPONSORS file for full details. Squid is
12 * Copyrighted (C) 2001 by the Regents of the University of
13 * California; see the COPYRIGHT file for full details. Squid
14 * incorporates software developed and/or copyrighted by other
15 * sources; see the CREDITS file for full details.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
26ac0430 21 *
59b2d47f 22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26ac0430 26 *
59b2d47f 27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
30 *
59b2d47f 31 */
32
582c2af2 33#include "squid.h"
b9ae18aa 34#include "ConfigOption.h"
59b2d47f 35
b9ae18aa 36ConfigOptionVector::~ConfigOptionVector()
37{
385acf91 38 while (!options.empty()) {
b9ae18aa 39 delete options.back();
40 options.pop_back();
41 }
42}
59b2d47f 43
b9ae18aa 44bool
350e2aec 45ConfigOptionVector::parse(char const *option, const char *value, int isaReconfig)
59b2d47f 46{
c8ea3cc0 47 std::vector<ConfigOption *>::iterator i = options.begin();
59b2d47f 48
b9ae18aa 49 while (i != options.end()) {
350e2aec 50 if ((*i)->parse(option,value, isaReconfig))
b9ae18aa 51 return true;
59b2d47f 52
b9ae18aa 53 ++i;
54 }
59b2d47f 55
b9ae18aa 56 return false;
57}
59b2d47f 58
b9ae18aa 59void
60ConfigOptionVector::dump(StoreEntry * e) const
61{
c8ea3cc0 62 for (std::vector<ConfigOption *>::const_iterator i = options.begin();
b9ae18aa 63 i != options.end(); ++i)
64 (*i)->dump(e);
65}