Vuo  2.3.2
Public Member Functions | Static Public Member Functions | Protected Types | Static Protected Member Functions | List of all members
VuoModuleCompiler Class Referenceabstract

Description

Base class for compiling node classes from various source formats.

Definition at line 19 of file VuoModuleCompiler.hh.

Public Member Functions

virtual Module * compile (std::function< VuoCompilerType *(const string &)> getVuoType, dispatch_queue_t llvmQueue, VuoCompilerIssues *issues)=0
 Compiles the source file to LLVM bitcode that can be loaded as a Vuo node class. More...
 
virtual void overrideSourceCode (const string &sourceCode, VuoFileUtilities::File *sourceFile)=0
 When compiling, sourceCode will be used instead of the contents of the source file. More...
 

Static Public Member Functions

static VuoModuleCompilernewModuleCompiler (string type, const string &moduleKey, VuoFileUtilities::File *sourceFile)
 Creates an instance of a subclass of VuoModuleCompiler. More...
 

Protected Types

typedef VuoModuleCompiler *(* Factory) (const string &moduleKey, VuoFileUtilities::File *sourceFile)
 A method that creates an instance of a subclass of VuoModuleCompiler. More...
 

Static Protected Member Functions

static void registerModuleCompiler (string type, Factory factory)
 Registers a method that creates an instance of a subclass of VuoModuleCompiler. More...
 

Member Typedef Documentation

◆ Factory

typedef VuoModuleCompiler*(* VuoModuleCompiler::Factory) (const string &moduleKey, VuoFileUtilities::File *sourceFile)
protected

A method that creates an instance of a subclass of VuoModuleCompiler.

Definition at line 43 of file VuoModuleCompiler.hh.

Member Function Documentation

◆ compile()

virtual Module* VuoModuleCompiler::compile ( std::function< VuoCompilerType *(const string &)>  getVuoType,
dispatch_queue_t  llvmQueue,
VuoCompilerIssues issues 
)
pure virtual

Compiles the source file to LLVM bitcode that can be loaded as a Vuo node class.

If there are errors, they are reported in issues and the return value is null.

Implemented in VuoIsfModuleCompiler.

◆ newModuleCompiler()

VuoModuleCompiler * VuoModuleCompiler::newModuleCompiler ( string  type,
const string &  moduleKey,
VuoFileUtilities::File sourceFile 
)
static

Creates an instance of a subclass of VuoModuleCompiler.

Definition at line 51 of file VuoModuleCompiler.cc.

◆ overrideSourceCode()

virtual void VuoModuleCompiler::overrideSourceCode ( const string &  sourceCode,
VuoFileUtilities::File sourceFile 
)
pure virtual

When compiling, sourceCode will be used instead of the contents of the source file.

Optionally, sourceFile specifies which file to override when the module has multiple source files.

Implemented in VuoIsfModuleCompiler.

◆ registerModuleCompiler()

void VuoModuleCompiler::registerModuleCompiler ( string  type,
VuoModuleCompiler::Factory  factory 
)
staticprotected

Registers a method that creates an instance of a subclass of VuoModuleCompiler.

To be called by plugin dylibs.

Definition at line 36 of file VuoModuleCompiler.cc.


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