|
| ||||||||||||||||
The execution process may be optimized by not using visitors. Having instructions implement a method that returns a flow action directly.
| enum FlowAction { ACCEPT, REJ, DEFAULT } | FlowAction |
A FlowAction is what has to be done with the route. DEFAULT is the default action which is normally "go to the next term", or if the last term, ACCEPT.
| RuntimeError (class) | RuntimeError |
The semantic check should get rid of these.
| IvExec (vector<PolicyInstr*>& policies, SetManager& sman,
VarRW& varrw,
ostream* os)
| IvExec |
Execute the give policies with the given varrw [i.e. route].
Parameters:
| policies | policies to execute. |
| sman | set manager to use for loading sets. |
| varrw | interface to read/write route variables. |
| os | if not null, an execution trace will be output to stream. |
| ~IvExec ()
| ~IvExec |
| FlowAction run ()
| run |
| FlowAction runPolicy (PolicyInstr& pi)
| runPolicy |
Execute a policy.
Parameters:
| pi | policy to execute |
| FlowAction runTerm (TermInstr& ti)
| runTerm |
Execute a term.
Parameters:
| ti | term to execute. |
| void visit (Push& p)
| visit |
Parameters:
| p | push to execute. |
Reimplemented from InstrVisitor.
| void visit (PushSet& ps)
| visit |
Parameters:
| ps | push of a set to execute. |
Reimplemented from InstrVisitor.
| void visit (OnFalseExit& x)
| visit |
Parameters:
| x | OnFalseExit to execute. |
Reimplemented from InstrVisitor.
| void visit (Regex& re)
| visit |
Parameters:
| re | Regex to execute. |
Reimplemented from InstrVisitor.
| void visit (Load& l)
| visit |
Parameters:
| l | Load to execute. |
Reimplemented from InstrVisitor.
| void visit (Store& s)
| visit |
Parameters:
| s | Store to execute. |
Reimplemented from InstrVisitor.
| void visit (Accept& a)
| visit |
Parameters:
| a | accept the route. |
Reimplemented from InstrVisitor.
| void visit (Reject& r)
| visit |
Parameters:
| r | reject the route. |
Reimplemented from InstrVisitor.
| void visit (NaryInstr& nary)
| visit |
Parameters:
| nary | N-ary instruction to execute. |
Reimplemented from InstrVisitor.
| string fa2str (const FlowAction& fa)
| fa2str |
[static]
Parameters:
| fa | Flow action to convert. |
Returns: String representation of flow action.