]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/HierCode.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / acl / HierCode.h
1 /*
2 * Copyright (C) 1996-2017 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 #ifndef SQUID_ACLHIERCODE_H
10 #define SQUID_ACLHIERCODE_H
11
12 #include "acl/Strategised.h"
13 #include "acl/Strategy.h"
14 #include "hier_code.h"
15
16 /// \ingroup ACLAPI
17 class ACLHierCodeStrategy : public ACLStrategy<hier_code>
18 {
19
20 public:
21 virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *, ACLFlags &);
22 virtual bool requiresRequest() const {return true;}
23
24 static ACLHierCodeStrategy *Instance();
25
26 /**
27 * Not implemented to prevent copies of the instance.
28 \par
29 * Not private to prevent brain dead g+++ warnings about
30 * private constructors with no friends
31 */
32 ACLHierCodeStrategy(ACLHierCodeStrategy const &);
33
34 private:
35 static ACLHierCodeStrategy Instance_;
36 ACLHierCodeStrategy() {}
37
38 ACLHierCodeStrategy &operator=(ACLHierCodeStrategy const &);
39 };
40
41 /// \ingroup ACLAPI
42 class ACLHierCode
43 {
44
45 private:
46 static ACL::Prototype RegistryProtoype;
47 static ACLStrategised<hier_code> RegistryEntry_;
48 };
49
50 #endif /* SQUID_ACLHIERCODE_H */
51