]> git.ipfire.org Git - thirdparty/squid.git/blame - src/adaptation/DynamicGroupCfg.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / adaptation / DynamicGroupCfg.h
CommitLineData
bbc27441 1/*
f70aedc4 2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
bbc27441
AJ
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
53340485
AR
9#ifndef SQUID_ADAPTATION__DYNAMIC_GROUP_CFG_H
10#define SQUID_ADAPTATION__DYNAMIC_GROUP_CFG_H
11
53340485
AR
12#include "SquidString.h"
13
c8ea3cc0
FC
14#include <vector>
15
53340485
AR
16namespace Adaptation
17{
18
19/// DynamicServiceGroup configuration to remember future dynamic chains
20class DynamicGroupCfg
21{
22public:
c8ea3cc0 23 typedef std::vector<String> Store;
53340485
AR
24 typedef String Id;
25
26 Id id; ///< group id
27 Store services; ///< services in the group
28
29 bool empty() const { return services.empty(); } ///< no services added
30 void add(const String &item); ///< updates group id and services
31 void clear(); ///< makes the config empty
32};
33
34inline
35std::ostream &operator <<(std::ostream &os, const DynamicGroupCfg &cfg)
36{
37 return os << cfg.id;
38}
39
40} // namespace Adaptation
41
42#endif /* SQUID_ADAPTATION__DYNAMIC_GROUP_CFG_H */
43