Sequence.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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/* DEBUG: section 86 ESI processing */
10
11#ifndef SQUID_ESISEQUENCE_H
12#define SQUID_ESISEQUENCE_H
13
14#include "esi/Element.h"
15#include "mem/forward.h"
16
17/* esiSequence */
18
19class esiSequence : public ESIElement
20{
22
23public:
24 esiSequence(esiTreeParentPtr, bool = false);
25 ~esiSequence() override;
26
27 void render(ESISegment::Pointer) override;
28 bool addElement (ESIElement::Pointer) override;
29 esiProcessResult_t process (int dovars) override;
31 bool mayFail () const override;
32 void wontFail();
33 void fail(ESIElement *, char const *anError = nullptr) override;
34 void makeCachableElements(esiSequence const &old);
35 Pointer makeCacheable() const override;
36 void makeUsableElements(esiSequence const &old, ESIVarState &);
38
39 Esi::Elements elements; /* unprocessed or rendered nodes */
41
42 struct {
43 unsigned int dovars:1; /* for esiVar */
45 void finish() override;
46
47protected:
48 esiSequence(esiSequence const &);
50
51private:
52 int elementIndex (ESIElement::Pointer anElement) const;
54 bool failed;
55 esiProcessResult_t processOne(int, size_t);
60 size_t nextElementToProcess() const;
61 void nextElementToProcess(size_t const &);
62 bool finishedProcessing() const;
63 void processStep(int dovars);
64};
65
66#endif /* SQUID_ESISEQUENCE_H */
67
esiProcessResult_t
Definition: Element.h:18
unsigned int dovars
Definition: Sequence.h:43
bool failed
Definition: Sequence.h:54
~esiSequence() override
Definition: Sequence.cc:27
void processStep(int dovars)
Definition: Sequence.cc:187
bool finishedProcessing() const
Definition: Sequence.cc:60
struct esiSequence::@61 flags
Pointer makeCacheable() const override
Definition: Sequence.cc:358
esiProcessResult_t process(int dovars) override
Definition: Sequence.cc:238
MEMPROXY_CLASS(esiSequence)
Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override
Definition: Sequence.cc:377
size_t processedcount
Definition: Sequence.h:40
bool mayFail() const override
Definition: Sequence.cc:66
size_t nextElementToProcess() const
Definition: Sequence.cc:48
bool mayFail_
Definition: Sequence.h:53
void makeUsableElements(esiSequence const &old, ESIVarState &)
Definition: Sequence.cc:347
bool const provideIncrementalData
Definition: Sequence.h:56
void render(ESISegment::Pointer) override
Definition: Sequence.cc:82
esiTreeParentPtr parent
Definition: Sequence.h:49
Esi::Elements elements
Definition: Sequence.h:39
size_t nextElementToProcess_
Definition: Sequence.h:59
esiSequence(esiTreeParentPtr, bool=false)
Definition: Sequence.cc:33
void fail(ESIElement *, char const *anError=nullptr) override
Definition: Sequence.cc:307
void finish() override
Definition: Sequence.cc:104
void wontFail()
Definition: Sequence.cc:75
esiProcessResult_t processOne(int, size_t)
Definition: Sequence.cc:200
bool addElement(ESIElement::Pointer) override
Definition: Sequence.cc:148
int elementIndex(ESIElement::Pointer anElement) const
Definition: Sequence.cc:177
void makeCachableElements(esiSequence const &old)
Definition: Sequence.cc:336
bool processing
Definition: Sequence.h:57
esiProcessResult_t processingResult
Definition: Sequence.h:58
void provideData(ESISegment::Pointer, ESIElement *) override
Definition: Sequence.cc:112
std::vector< ESIElement::Pointer > Elements
an ordered set of ESI elements
Definition: Element.h:92

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors