]>
Commit | Line | Data |
---|---|---|
43ae1d95 | 1 | /* |
bbc27441 | 2 | * Copyright (C) 1996-2014 The Squid Software Foundation and contributors |
43ae1d95 | 3 | * |
bbc27441 AJ |
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. | |
43ae1d95 | 7 | */ |
8 | ||
bbc27441 AJ |
9 | /* DEBUG: section 86 ESI processing */ |
10 | ||
43ae1d95 | 11 | #ifndef SQUID_ESISEQUENCE_H |
12 | #define SQUID_ESISEQUENCE_H | |
13 | ||
f99c2cfe AR |
14 | #include "esi/Element.h" |
15 | #include "esi/ElementList.h" | |
ed6e9fb9 | 16 | #include "mem/forward.h" |
43ae1d95 | 17 | |
18 | /* esiSequence */ | |
19 | ||
20 | class esiSequence : public ESIElement | |
21 | { | |
b001e822 | 22 | MEMPROXY_CLASS(esiSequence); |
43ae1d95 | 23 | |
741c2986 | 24 | public: |
43ae1d95 | 25 | esiSequence(esiTreeParentPtr, bool = false); |
26 | ~esiSequence(); | |
27 | ||
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; | |
33 | void wontFail(); | |
924f73bc | 34 | void fail(ESIElement *, char const *anError = NULL); |
43ae1d95 | 35 | void makeCachableElements(esiSequence const &old); |
36 | Pointer makeCacheable() const; | |
924f73bc | 37 | void makeUsableElements(esiSequence const &old, ESIVarState &); |
38 | Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const; | |
43ae1d95 | 39 | |
40 | ElementList elements; /* unprocessed or rendered nodes */ | |
41 | size_t processedcount; | |
42 | ||
26ac0430 | 43 | struct { |
3d0ac046 HN |
44 | int dovars:1; /* for esiVar */ |
45 | } flags; | |
43ae1d95 | 46 | void finish(); |
47 | ||
48 | protected: | |
49 | esiSequence(esiSequence const &); | |
50 | esiTreeParentPtr parent; | |
51 | ||
52 | private: | |
43ae1d95 | 53 | int elementIndex (ESIElement::Pointer anElement) const; |
54 | bool mayFail_; | |
55 | bool failed; | |
56 | esiProcessResult_t processOne(int, size_t); | |
57 | bool const provideIncrementalData; | |
58 | bool processing; | |
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); | |
65 | }; | |
66 | ||
67 | #endif /* SQUID_ESISEQUENCE_H */ |