class CodeGenerator

Generic code generator. It is suitable for import filters. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Protected Methods

Protected Members


Detailed Description

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:

prototarget protocol.
filtertarget filter type.
varmapvarmap.
 CodeGenerator (const string& proto, const VarMap& varmap)

CodeGenerator

Initialize code generation for an import of a specific protocol.

Parameters:

prototarget protocol.
varmapvarmap.
 ~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]


Generated by: bms on anglepoise.lon.incunabulum.net on Wed Jul 23 10:05:59 2008, using kdoc 2.0a54+XORP.