2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 86 ESI processing */
11 #ifndef SQUID_ESISEQUENCE_H
12 #define SQUID_ESISEQUENCE_H
14 #include "esi/Element.h"
15 #include "mem/forward.h"
19 class esiSequence
: public ESIElement
21 MEMPROXY_CLASS(esiSequence
);
24 esiSequence(esiTreeParentPtr
, bool = false);
27 void render(ESISegment::Pointer
);
28 bool addElement (ESIElement::Pointer
);
29 esiProcessResult_t
process (int dovars
);
30 void provideData (ESISegment::Pointer
, ESIElement
*);
31 bool mayFail () const;
33 void fail(ESIElement
*, char const *anError
= NULL
);
34 void makeCachableElements(esiSequence
const &old
);
35 Pointer
makeCacheable() const;
36 void makeUsableElements(esiSequence
const &old
, ESIVarState
&);
37 Pointer
makeUsable(esiTreeParentPtr
, ESIVarState
&) const;
39 Esi::Elements elements
; /* unprocessed or rendered nodes */
40 size_t processedcount
;
43 int dovars
:1; /* for esiVar */
48 esiSequence(esiSequence
const &);
49 esiTreeParentPtr parent
;
52 int elementIndex (ESIElement::Pointer anElement
) const;
55 esiProcessResult_t
processOne(int, size_t);
56 bool const provideIncrementalData
;
58 esiProcessResult_t processingResult
;
59 size_t nextElementToProcess_
;
60 size_t nextElementToProcess() const;
61 void nextElementToProcess(size_t const &);
62 bool finishedProcessing() const;
63 void processStep(int dovars
);
66 #endif /* SQUID_ESISEQUENCE_H */