Strategy.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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
17
18template<class M>
19
22{
23
24public:
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
Configured ACL parameter(s) (e.g., domain names in dstdomain ACL).
Definition: Data.h:18
A matching algorithm.
Definition: Strategy.h:22
virtual bool requiresReply() const
Definition: Strategy.h:32
virtual ~ACLStrategy()
Definition: Strategy.h:36
virtual const Acl::Options & options()
Definition: Strategy.h:28
virtual bool requiresRequest() const
Definition: Strategy.h:30
virtual bool valid() const
Definition: Strategy.h:34
virtual int match(ACLData< M > *&, ACLFilledChecklist *)=0
const Options & NoOptions()
Definition: Options.cc:234
std::vector< const Option * > Options
Definition: Options.h:214

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors