Ast2Php Class Reference

#include <Translation.h>

Inheritance diagram for Ast2Php:

Inheritance graph
[legend]
Collaboration diagram for Ast2Php:

Collaboration graph
[legend]

Detailed Description

Definition at line 86 of file Translation.h.


Public Member Functions

 Ast2Php ()
virtual ~Ast2Php ()
virtual StringBuffer operator() (const tree< AstNode > &, const MapClasses *classes=0, const MapVariables *vars=0, const MapFunctions *func=0, const MapAssignments *assigns=0, const MapVarEquivalent *equiv=0)

Constructor & Destructor Documentation

Ast2Php::Ast2Php (  )  [inline]

Definition at line 89 of file Translation.h.

00089 {}

virtual Ast2Php::~Ast2Php (  )  [inline, virtual]

Definition at line 90 of file Translation.h.

00090 {}


Member Function Documentation

StringBuffer Ast2Php::operator() ( const tree< AstNode > &  tr,
const MapClasses classes = 0,
const MapVariables vars = 0,
const MapFunctions func = 0,
const MapAssignments assigns = 0,
const MapVarEquivalent equiv = 0 
) [virtual]

Implements Translation.

Definition at line 504 of file Translation.cpp.

References tree< T, tree_node_allocator >::begin(), tree< T, tree_node_allocator >::end(), and StringBuffer::format().

00506 {
00507     StringBuffer buffer, out;
00508     // Add the classes definitions
00509     for (tree<AstNode>::iterator iter=tr.begin();iter!=tr.end();++iter) {
00510         if (iter->getType() == "text")
00511             buffer << iter->getValue() + " ";
00512     }
00513     buffer.format();
00514     out << "<?php\n\n";
00515     out << buffer;
00516     out << "\n\n?>";
00517     return out;
00518 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Feb 27 20:31:38 2008 for php.ast.svn.src. by  doxygen 1.5.3