Strategy.h
Go to the documentation of this file.
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_ACLSTRATEGY_H
10 #define SQUID_ACLSTRATEGY_H
11 
12 #include "acl/Acl.h"
13 #include "acl/Data.h"
14 #include "acl/Options.h"
15 
16 class ACLFilledChecklist;
17 
18 template<class M>
19 
22 {
23 
24 public:
25  typedef M MatchType;
26 
27  /* Replicate ACL API parts relevant to the matching algorithm. */
28  virtual const Acl::Options &options() { return Acl::NoOptions(); }
29  virtual int match (ACLData<M> * &, ACLFilledChecklist *) = 0;
30  virtual bool requiresRequest() const {return false;}
31 
32  virtual bool requiresReply() const {return false;}
33 
34  virtual bool valid() const {return true;}
35 
36  virtual ~ACLStrategy() {}
37 };
38 
39 #endif /* SQUID_ACLSTRATEGY_H */
40 
virtual bool valid() const
Definition: Strategy.h:34
virtual bool requiresReply() const
Definition: Strategy.h:32
virtual ~ACLStrategy()
Definition: Strategy.h:36
Configured ACL parameter(s) (e.g., domain names in dstdomain ACL).
Definition: Data.h:17
virtual const Acl::Options & options()
Definition: Strategy.h:28
virtual int match(ACLData< M > *&, ACLFilledChecklist *)=0
A matching algorithm.
Definition: Strategy.h:21
std::map< OptionName, const Option *, OptionNameCmp > Options
name:option map
Definition: Options.h:159
virtual bool requiresRequest() const
Definition: Strategy.h:30
const Options & NoOptions()
Definition: Options.cc:247

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors