Pothos  0.7.0-gf7fbae99
The Pothos dataflow programming software suite
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Pothos::Util::Compiler Class Referenceabstract

#include <Compiler.hpp>

Public Types

typedef std::shared_ptr< CompilerSptr
 

Public Member Functions

virtual ~Compiler (void)
 Compiler destructor. More...
 
virtual bool test (void)=0
 
virtual std::string compileCppModule (const CompilerArgs &args)=0
 
const std::string & createTempFile (const std::string &ext="")
 

Static Public Member Functions

static Sptr make (const std::string &name="")
 

Detailed Description

A simple compiler interface for creating modules

Member Typedef Documentation

◆ Sptr

typedef std::shared_ptr<Compiler> Pothos::Util::Compiler::Sptr

Constructor & Destructor Documentation

◆ ~Compiler()

virtual Pothos::Util::Compiler::~Compiler ( void  )
virtual

Compiler destructor.

Member Function Documentation

◆ compileCppModule()

virtual std::string Pothos::Util::Compiler::compileCppModule ( const CompilerArgs args)
pure virtual

Compile a set of C++ sources into a runtime loadable module.

Exceptions
Exceptionwith message when a compilation fails
Parameters
argsthe compiler arguments (flags and sources)
Returns
the path to the output binary/loadable module

◆ createTempFile()

const std::string& Pothos::Util::Compiler::createTempFile ( const std::string &  ext = "")

Get an absolute path to a temporary file. The file will be automatically removed when the Compiler object is destroyed.

Parameters
extthe file extension with dot (ex: ".obj")
Returns
the full path to a temporary file

◆ make()

static Sptr Pothos::Util::Compiler::make ( const std::string &  name = "")
static

Create a compiler instance given the name of the compiler. Plugins for custom Compilers should be located in the plugin registry: /util/compiler/[name]

Exceptions
Exceptionif the factory function fails.
Parameters
namethe name of a compilier factory in the plugin tree
Returns
a new shared pointer to a compiler interface

◆ test()

virtual bool Pothos::Util::Compiler::test ( void  )
pure virtual

Test if this compiler instance is usable.


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