All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
TccContext Class Reference

Public Member Functions

 TccContext (const File &fileToCompile=File())
 
int openContext ()
 
void closeContext ()
 
void addFunction (void *functionPointer, const String &name)
 
void * getFunction (String functionName)
 
int compile (const File &f)
 
int compile (const String &code)
 

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.