#include <Translation.h>
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) |
Ast2Php::Ast2Php | ( | ) | [inline] |
virtual Ast2Php::~Ast2Php | ( | ) | [inline, virtual] |
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 }