Public Member Functions | List of all members
TccContext Class Reference

A RAII wrapper around the TCC compiler. More...

Public Member Functions

void addFunction (void *functionPointer, const String &name)
 Adds a function to the compiled bytecode. More...
 
void closeContext ()
 Closes the context. More...
 
int compile (const File &f)
 Compiles a C file. More...
 
int compile (const String &code)
 Compiles a String containg C code. More...
 
void * getFunction (String functionName)
 Get a function from the compiled bytecode. More...
 
int openContext ()
 Opens the context for compiling. More...
 
 TccContext (const File &fileToCompile=File())
 Creates a new TccContext. More...
 

Detailed Description

A RAII wrapper around the TCC compiler.

Constructor & Destructor Documentation

TccContext ( const File &  fileToCompile = File())

Creates a new TccContext.

You must call openContext() before compiling or pushing functions to the context. If you pass in a file, it will add the directory to the include path so you can include sibling header files...

Member Function Documentation

void addFunction ( void *  functionPointer,
const String &  name 
)

Adds a function to the compiled bytecode.

void closeContext ( )

Closes the context.

after a compilation.

int compile ( const File &  f)

Compiles a C file.

int compile ( const String &  code)

Compiles a String containg C code.

void * getFunction ( String  functionName)

Get a function from the compiled bytecode.

int openContext ( )

Opens the context for compiling.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.