BoolOps.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_ACL_LOGIC_H
10#define SQUID_ACL_LOGIC_H
11
12#include "acl/InnerNode.h"
13
14/* ACLs defined here are used internally to construct an ACL expression tree.
15 * They cannot be specified directly in squid.conf because squid.conf ACLs are
16 * more complex than (and are implemented using) these operator-like classes.*/
17
18namespace Acl
19{
20
22class NotNode: public InnerNode
23{
25
26public:
27 explicit NotNode(ACL *acl);
28
29private:
30 /* ACL API */
31 virtual char const *typeString() const;
32 virtual void parse();
33 virtual SBufList dump() const;
34
35 /* Acl::InnerNode API */
36 virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
37};
38
42class AndNode: public InnerNode
43{
45
46public:
47 /* ACL API */
48 virtual char const *typeString() const;
49 virtual void parse();
50
51private:
52 virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
53};
54
58class OrNode: public InnerNode
59{
61
62public:
65 virtual bool bannedAction(ACLChecklist *, Nodes::const_iterator) const;
66
67 /* ACL API */
68 virtual char const *typeString() const;
69 virtual void parse();
70
71protected:
72 mutable Nodes::const_iterator lastMatch_;
73
74private:
75 virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
76};
77
78} // namespace Acl
79
80#endif /* SQUID_ACL_LOGIC_H */
81
Definition: Acl.h:40
virtual char const * typeString() const
Definition: BoolOps.cc:66
virtual void parse()
parses node representation in squid.conf; dies on failures
Definition: BoolOps.cc:85
virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const
Definition: BoolOps.cc:72
MEMPROXY_CLASS(AndNode)
An intermediate ACL tree node. Manages a collection of child tree nodes.
Definition: InnerNode.h:22
Implements the "not" or "!" operator.
Definition: BoolOps.h:23
MEMPROXY_CLASS(NotNode)
virtual void parse()
parses node representation in squid.conf; dies on failures
Definition: BoolOps.cc:28
virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const
Definition: BoolOps.cc:36
virtual SBufList dump() const
Definition: BoolOps.cc:56
virtual char const * typeString() const
Definition: BoolOps.cc:50
NotNode(ACL *acl)
Definition: BoolOps.cc:17
virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const
Definition: BoolOps.cc:106
virtual void parse()
parses node representation in squid.conf; dies on failures
Definition: BoolOps.cc:128
MEMPROXY_CLASS(OrNode)
virtual char const * typeString() const
Definition: BoolOps.cc:94
Nodes::const_iterator lastMatch_
Definition: BoolOps.h:72
virtual bool bannedAction(ACLChecklist *, Nodes::const_iterator) const
Definition: BoolOps.cc:100
Definition: Acl.cc:31
std::list< SBuf > SBufList
Definition: forward.h:23

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors