2 * Copyright (C) 1996-2014 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_ESIASSIGN_H
12 #define SQUID_ESIASSIGN_H
14 #include "esi/Element.h"
15 #include "esi/VarState.h"
16 #include "SquidString.h"
18 /* ESIVariableExpression */
19 /* This is a variable that is itself and expression */
21 class ESIVariableExpression
: public ESIVarState::Variable
25 ~ESIVariableExpression();
26 ESIVariableExpression (String
const &value
);
27 virtual void eval (ESIVarState
&state
, char const *, char const *) const;
37 class ESIAssign
: public ESIElement
41 MEMPROXY_CLASS(ESIAssign
);
42 ESIAssign (esiTreeParentPtr
, int, const char **, ESIContext
*);
43 ESIAssign (ESIAssign
const &);
44 ESIAssign
&operator=(ESIAssign
const &);
46 esiProcessResult_t
process (int dovars
);
47 void render(ESISegment::Pointer
);
48 bool addElement(ESIElement::Pointer
);
49 void provideData (ESISegment::Pointer data
, ESIElement
* source
);
50 Pointer
makeCacheable() const;
51 Pointer
makeUsable(esiTreeParentPtr
, ESIVarState
&) const;
55 void evaluateVariable();
56 esiTreeParentPtr parent
;
57 ESIVarState
*varState
;
59 ESIVariableExpression
* value
;
60 ESIElement::Pointer variable
;
61 String unevaluatedVariable
;
64 MEMPROXY_CLASS_INLINE(ESIAssign
);
66 #endif /* SQUID_ESIASSIGN_H */