]> git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/DynamicGroupCfg.h
Undo trunk r13269: "Vector refactor: move almost all clients to std::vector"
[thirdparty/squid.git] / src / adaptation / DynamicGroupCfg.h
1 #ifndef SQUID_ADAPTATION__DYNAMIC_GROUP_CFG_H
2 #define SQUID_ADAPTATION__DYNAMIC_GROUP_CFG_H
3
4 #include "base/Vector.h"
5 #include "SquidString.h"
6
7 namespace Adaptation
8 {
9
10 /// DynamicServiceGroup configuration to remember future dynamic chains
11 class DynamicGroupCfg
12 {
13 public:
14 typedef Vector<String> Store;
15 typedef String Id;
16
17 Id id; ///< group id
18 Store services; ///< services in the group
19
20 bool empty() const { return services.empty(); } ///< no services added
21 void add(const String &item); ///< updates group id and services
22 void clear(); ///< makes the config empty
23 };
24
25 inline
26 std::ostream &operator <<(std::ostream &os, const DynamicGroupCfg &cfg)
27 {
28 return os << cfg.id;
29 }
30
31 } // namespace Adaptation
32
33 #endif /* SQUID_ADAPTATION__DYNAMIC_GROUP_CFG_H */
34