2 * Copyright (C) 1996-2016 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 "esi/ElementList.h"
16 #include "mem/forward.h"
20 class esiSequence
: public ESIElement
22 MEMPROXY_CLASS(esiSequence
);
25 esiSequence(esiTreeParentPtr
, bool = false);
28 void render(ESISegment::Pointer
);
29 bool addElement (ESIElement::Pointer
);
30 esiProcessResult_t
process (int dovars
);
31 void provideData (ESISegment::Pointer
, ESIElement
*);
32 bool mayFail () const;
34 void fail(ESIElement
*, char const *anError
= NULL
);
35 void makeCachableElements(esiSequence
const &old
);
36 Pointer
makeCacheable() const;
37 void makeUsableElements(esiSequence
const &old
, ESIVarState
&);
38 Pointer
makeUsable(esiTreeParentPtr
, ESIVarState
&) const;
40 ElementList elements
; /* unprocessed or rendered nodes */
41 size_t processedcount
;
44 int dovars
:1; /* for esiVar */
49 esiSequence(esiSequence
const &);
50 esiTreeParentPtr parent
;
53 int elementIndex (ESIElement::Pointer anElement
) const;
56 esiProcessResult_t
processOne(int, size_t);
57 bool const provideIncrementalData
;
59 esiProcessResult_t processingResult
;
60 size_t nextElementToProcess_
;
61 size_t nextElementToProcess() const;
62 void nextElementToProcess(size_t const &);
63 bool finishedProcessing() const;
64 void processStep(int dovars
);
67 #endif /* SQUID_ESISEQUENCE_H */