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_Rvirtual ~ContextVis_R(); [destructor] [virtual] | Destructor |
setStrategyvoid setStrategy(ROSE_VisitorPattern* strategy); | Allows the strategy to be set dynamically. |
visitvirtual void visit(SgAccAsyncClause* variable_SgAccAsyncClause); | |
visitDefaultvirtual void visitDefault(SgNode* n); [virtual] |
Protected Data Members¶
| Name | Description |
|---|---|
_strategy | Strategy to process a node, can be set dynamically. |
Created with MrDocs