|
|
This class visits a structure of Nodes and generates appropriate code.
CodeGeneratorErr (class) | CodeGeneratorErr |
This may occur for example, if an import policy has a dest part. The semantic check should however get rid of all errors.
CodeGenerator (const VarMap& varmap)
| CodeGenerator |
CodeGenerator (const string& proto, const filter::Filter& filter,
const VarMap& varmap)
| CodeGenerator |
Generate code for a specific protocol and filter [target]/
This construct is mainly used by derived classes to set the code target.a
Parameters:
proto | target protocol. |
filter | target filter type. |
varmap | varmap. |
CodeGenerator (const string& proto, const VarMap& varmap)
| CodeGenerator |
Initialize code generation for an import of a specific protocol.
Parameters:
proto | target protocol. |
varmap | varmap. |
~CodeGenerator ()
| ~CodeGenerator |
[virtual]
const Element* visit (NodeUn& node)
| visit |
Reimplemented from Visitor.
const Element* visit (NodeBin& node)
| visit |
Reimplemented from Visitor.
const Element* visit (NodeAssign& node)
| visit |
Reimplemented from Visitor.
const Element* visit (NodeElem& node)
| visit |
Reimplemented from Visitor.
const Element* visit (NodeVar& node)
| visit |
Reimplemented from Visitor.
const Element* visit (NodeSet& node)
| visit |
Reimplemented from Visitor.
const Element* visit (NodeAccept& node)
| visit |
Reimplemented from Visitor.
const Element* visit (NodeReject& node)
| visit |
Reimplemented from Visitor.
const Element* visit (PolicyStatement& policy)
| visit |
Reimplemented from Visitor.
const Element* visit (Term& policy)
| visit |
Reimplemented from Visitor.
const Element* visit (NodeProto& policy)
| visit |
Reimplemented from Visitor.
const Code& code ()
| code |
Returns: code generated.
const Element* visit_policy (PolicyStatement& policy)
| visit_policy |
[protected virtual]
const Element* visit_term (Term& term)
| visit_term |
[protected virtual]
const Element* visit_proto (NodeProto& node)
| visit_proto |
[protected virtual]
const string& protocol ()
| protocol |
[protected virtual]
Code _code | _code |
[protected]
ostringstream _os | _os |
[protected]
const VarMap& _varmap | _varmap |
[protected]