docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
docc::compile::SrcFileCompiler Class Reference

#include <docc/compile/src_file_compiler.h>

Inheritance diagram for docc::compile::SrcFileCompiler:
[legend]

Public Member Functions

 SrcFileCompiler (const std::filesystem::path &output_dir, const std::optional< std::string > &main_src_ext, const std::string &main_header_ext, const std::string &bin_ext, const std::optional< std::string > &compiler, const std::optional< std::string > &linker, const std::string &common_args, const std::string &compile_args, const std::vector< LibPath > &library_paths, const std::vector< std::string > &link_options, bool link_immediately, std::unordered_map< std::string, std::unique_ptr< SrcFileCompiler > > &&redirects, const std::vector< std::string > &parent_link_options, int codegen_order=0, int compile_min_order=0)
std::unique_ptr< CompileState > create_compile (const sdfg::StructuredSDFG &sdfg, const sdfg::codegen::CodeSnippet *snippet, std::function< void(std::ostream &)> generator) override
std::unique_ptr< CompileState > do_create_compile (const sdfg::StructuredSDFG &sdfg, const sdfg::codegen::CodeSnippet *snippet, std::function< void(std::ostream &)> generator)
std::filesystem::path process (sdfg::codegen::CodeGenerator &generator, CompileExecutor &executor, const std::string &output_file_name, bool reuse_sources=false)
std::filesystem::path process (sdfg::codegen::CodeGenerator &generator, CompileExecutor &executor)
std::shared_ptr< sdfg::codegen::CodeSnippetFactory > create_snippet_factory (const sdfg::StructuredSDFG &sdfg) const
const std::vector< std::string > * get_contributed_link_options () const override
Public Member Functions inherited from docc::compile::CodegenCompiler
virtual ~CodegenCompiler ()=default

Protected Member Functions

std::filesystem::path generate_header_path (const sdfg::StructuredSDFG &sdfg) const
bool run_compiler (const std::filesystem::path &src, const std::filesystem::path &obj) const
void add_link_args (std::stringstream &cmd) const
bool run_link (const sdfg::StructuredSDFG &sdfg, CompileExecutor &executor, const std::filesystem::path &bin_file) const
bool run_compile_and_link_single (const std::filesystem::path &src, const std::filesystem::path &bin) const
std::filesystem::path emit_header (const sdfg::StructuredSDFG &sdfg, sdfg::codegen::CodeGenerator &generator)
void for_each_file_snippet (sdfg::codegen::CodeGenerator &generator, CompileExecutor &executor, std::function< void(const sdfg::codegen::CodeSnippet &)> callback)

Friends

class FileCompileState

Constructor & Destructor Documentation

◆ SrcFileCompiler()

docc::compile::SrcFileCompiler::SrcFileCompiler ( const std::filesystem::path & output_dir,
const std::optional< std::string > & main_src_ext,
const std::string & main_header_ext,
const std::string & bin_ext,
const std::optional< std::string > & compiler,
const std::optional< std::string > & linker,
const std::string & common_args,
const std::string & compile_args,
const std::vector< LibPath > & library_paths,
const std::vector< std::string > & link_options,
bool link_immediately,
std::unordered_map< std::string, std::unique_ptr< SrcFileCompiler > > && redirects,
const std::vector< std::string > & parent_link_options,
int codegen_order = 0,
int compile_min_order = 0 )

Member Function Documentation

◆ add_link_args()

void docc::compile::SrcFileCompiler::add_link_args ( std::stringstream & cmd) const
protected

◆ create_compile()

std::unique_ptr< CompileState > docc::compile::SrcFileCompiler::create_compile ( const sdfg::StructuredSDFG & sdfg,
const sdfg::codegen::CodeSnippet * snippet,
std::function< void(std::ostream &)> generator )
overridevirtual

◆ create_snippet_factory()

std::shared_ptr< sdfg::codegen::CodeSnippetFactory > docc::compile::SrcFileCompiler::create_snippet_factory ( const sdfg::StructuredSDFG & sdfg) const

◆ do_create_compile()

std::unique_ptr< CompileState > docc::compile::SrcFileCompiler::do_create_compile ( const sdfg::StructuredSDFG & sdfg,
const sdfg::codegen::CodeSnippet * snippet,
std::function< void(std::ostream &)> generator )

◆ emit_header()

std::filesystem::path docc::compile::SrcFileCompiler::emit_header ( const sdfg::StructuredSDFG & sdfg,
sdfg::codegen::CodeGenerator & generator )
protected

◆ for_each_file_snippet()

void docc::compile::SrcFileCompiler::for_each_file_snippet ( sdfg::codegen::CodeGenerator & generator,
CompileExecutor & executor,
std::function< void(const sdfg::codegen::CodeSnippet &)> callback )
protected

◆ generate_header_path()

std::filesystem::path docc::compile::SrcFileCompiler::generate_header_path ( const sdfg::StructuredSDFG & sdfg) const
protected

◆ get_contributed_link_options()

const std::vector< std::string > * docc::compile::SrcFileCompiler::get_contributed_link_options ( ) const
overridevirtual

◆ process() [1/2]

std::filesystem::path docc::compile::SrcFileCompiler::process ( sdfg::codegen::CodeGenerator & generator,
CompileExecutor & executor )
inline

◆ process() [2/2]

std::filesystem::path docc::compile::SrcFileCompiler::process ( sdfg::codegen::CodeGenerator & generator,
CompileExecutor & executor,
const std::string & output_file_name,
bool reuse_sources = false )

◆ run_compile_and_link_single()

bool docc::compile::SrcFileCompiler::run_compile_and_link_single ( const std::filesystem::path & src,
const std::filesystem::path & bin ) const
protected

◆ run_compiler()

bool docc::compile::SrcFileCompiler::run_compiler ( const std::filesystem::path & src,
const std::filesystem::path & obj ) const
protected

◆ run_link()

bool docc::compile::SrcFileCompiler::run_link ( const sdfg::StructuredSDFG & sdfg,
CompileExecutor & executor,
const std::filesystem::path & bin_file ) const
protected

◆ FileCompileState

friend class FileCompileState
friend

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