1 // Copyright (c) 1996 James Clark
2 // See the file copying.txt for copying permission.
4 #ifndef EvalContext_INCLUDED
5 #define EvalContext_INCLUDED 1
12 #ifdef DSSSL_NAMESPACE
13 namespace DSSSL_NAMESPACE {
23 class CurrentNodeSetter {
25 CurrentNodeSetter(const NodePtr &, const ProcessingMode *, EvalContext &);
29 NodePtr saveCurrentNode_;
30 const ProcessingMode *saveProcessingMode_;
34 StyleStack *styleStack;
35 unsigned specLevel; // level of the specification flow object in the style stack
36 StyleObj *overridingStyle;
37 Vector<size_t> *actualDependencies;
39 const ProcessingMode *processingMode;
40 LanguageObj *currentLanguage;
44 EvalContext::EvalContext()
45 : styleStack(0), overridingStyle(0),
46 actualDependencies(0), processingMode(0), currentLanguage(0)
51 EvalContext::CurrentNodeSetter::CurrentNodeSetter(const NodePtr &node,
52 const ProcessingMode *mode,
54 : ec_(&ec), saveCurrentNode_(ec.currentNode), saveProcessingMode_(ec.processingMode)
56 ec.currentNode = node;
57 ec.processingMode = mode;
61 EvalContext::CurrentNodeSetter::~CurrentNodeSetter()
63 ec_->currentNode = saveCurrentNode_;
64 ec_->processingMode = saveProcessingMode_;
67 #ifdef DSSSL_NAMESPACE
71 #endif /* not EvalContext_INCLUDED */