Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Member Functions | List of all members
om::scripting::mir::SourceGenerator Class Reference

A class that converts a pre-parsed Module abstract syntax tree into valid source code. More...

#include <omScriptingMirSourceGenerator.h>

Public Member Functions

 SourceGenerator ()
 
Bool generateSource (const Shared< Module > &module, UTF8StringBuffer &output)
 Generate valid source code from the specified pre-parsed Module AST. More...
 

Static Public Member Functions

static Bool generateType (const Shared< lang::Type > &type, UTF8StringBuffer &output)
 Generate source code for the specified type. More...
 
static Bool generateExpression (const Shared< Expression > &reference, UTF8StringBuffer &output)
 Generate source code for the specified expression. More...
 
static Bool generateVariableDeclaration (const Shared< VariableDeclaration > &variableDeclaration, UTF8StringBuffer &output)
 Generate source code for the specified variable declaration. More...
 
static Bool generateReference (const Shared< Reference > &reference, UTF8StringBuffer &output)
 Generate source code for the specified reference. More...
 
static Bool generateTemplateDeclaration (const Shared< TemplateDeclaration > &templateDeclaration, UTF8StringBuffer &output)
 Generate source code for the specified template declaration. More...
 
static Bool generateTemplateInstantiation (const Shared< TemplateInstantiation > &templateInstantiation, UTF8StringBuffer &output)
 Generate source code for the specified template instantiation. More...
 
static Bool generateLiteral (const Shared< Literal > &literal, UTF8StringBuffer &output)
 Generate source code for the specified literal. More...
 
static Bool generateVisibility (Visibility visibility, UTF8StringBuffer &output)
 Generate source code corresponding to the specified visibility type. More...
 

Detailed Description

A class that converts a pre-parsed Module abstract syntax tree into valid source code.

Constructor & Destructor Documentation

om::scripting::mir::SourceGenerator::SourceGenerator ( )
inline

Member Function Documentation

Bool om::scripting::mir::SourceGenerator::generateSource ( const Shared< Module > &  module,
UTF8StringBuffer &  output 
)

Generate valid source code from the specified pre-parsed Module AST.

The new source code is appended to the end of the specified string buffer. The method returns TRUE if the source code generation is successful, and FALSE if an error was encountered that would produce invalid source code.

If the method fails, this means that the structure of the Module or some other part of the specified AST had an invalid format.

static Bool om::scripting::mir::SourceGenerator::generateType ( const Shared< lang::Type > &  type,
UTF8StringBuffer &  output 
)
static

Generate source code for the specified type.

static Bool om::scripting::mir::SourceGenerator::generateExpression ( const Shared< Expression > &  reference,
UTF8StringBuffer &  output 
)
static

Generate source code for the specified expression.

static Bool om::scripting::mir::SourceGenerator::generateVariableDeclaration ( const Shared< VariableDeclaration > &  variableDeclaration,
UTF8StringBuffer &  output 
)
static

Generate source code for the specified variable declaration.

static Bool om::scripting::mir::SourceGenerator::generateReference ( const Shared< Reference > &  reference,
UTF8StringBuffer &  output 
)
static

Generate source code for the specified reference.

static Bool om::scripting::mir::SourceGenerator::generateTemplateDeclaration ( const Shared< TemplateDeclaration > &  templateDeclaration,
UTF8StringBuffer &  output 
)
static

Generate source code for the specified template declaration.

static Bool om::scripting::mir::SourceGenerator::generateTemplateInstantiation ( const Shared< TemplateInstantiation > &  templateInstantiation,
UTF8StringBuffer &  output 
)
static

Generate source code for the specified template instantiation.

static Bool om::scripting::mir::SourceGenerator::generateLiteral ( const Shared< Literal > &  literal,
UTF8StringBuffer &  output 
)
static

Generate source code for the specified literal.

static Bool om::scripting::mir::SourceGenerator::generateVisibility ( Visibility  visibility,
UTF8StringBuffer &  output 
)
static

Generate source code corresponding to the specified visibility type.


The documentation for this class was generated from the following file: