Skip to content

ContextVis_R

Strategy pattern applied to visitors: serves as a context to a strategy, which itself is a visitor; delegates all requests to the current strategy; capable of switching strategy at will. Derived classes may declare the known strategies as friend to facilitate communication between the strategies and their context.

Synopsis

Declared in <src/frontend/SageIII/Cxx_Grammar.h> (not stored in Git)

template<class R>
class ContextVis_R
    : public Visitor_R<R>

Base Classes

Name Description
Visitor_R<R>

Member Functions

Name Description
~ContextVis_R
virtual ~ContextVis_R(); [destructor] [virtual]
Destructor
setStrategy
void setStrategy(ROSE_VisitorPattern* strategy);
Allows the strategy to be set dynamically.
visit
virtual void visit(SgAccAsyncClause* variable_SgAccAsyncClause);
visitDefault
virtual void visitDefault(SgNode* n); [virtual]

Protected Data Members

Name Description
_strategy Strategy to process a node, can be set dynamically.

Created with MrDocs