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 ()

CodeGenerator

 CodeGenerator (const string& proto, const filter::Filter& filter)

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.
 CodeGenerator (const string& proto)

CodeGenerator

Initialize code generation for an import of a specific protocol.

Parameters:

prototarget protocol.
 ~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 (NodeRegex& 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]

Code _code

_code

[protected]

ostringstream _os

_os

[protected]


Generated by: pavlin on possum.icir.org on Wed Apr 13 21:53:13 2005, using kdoc $.