#ifndef JUCI_PROJECT_H_ #define JUCI_PROJECT_H_ #include "notebook.h" //Avoiding this circular include would lead to bloated code #include "cmake.h" #include #include "directories.h" #include #include #include "tooltips.h" class Notebook; //Avoiding this circular include would lead to bloated code class Project { public: Project(Notebook ¬ebook) : notebook(notebook) {} virtual ~Project() {} Notebook ¬ebook; static std::unordered_map run_arguments; static std::unordered_map debug_run_arguments; static std::atomic compiling; static std::atomic debugging; virtual std::pair get_run_arguments() {return {"", ""};} virtual void compile() {} virtual void compile_and_run() {} virtual std::pair debug_get_run_arguments() {return {"", ""};} Tooltips debug_variable_tooltips; virtual void debug_start(std::function status_callback, std::function stop_callback) {} virtual void debug_continue() {} virtual void debug_stop() {} virtual void debug_kill() {} virtual void debug_step_over() {} virtual void debug_step_into() {} virtual void debug_step_out() {} virtual void debug_backtrace() {} virtual void debug_show_variables() {} virtual void debug_run_command(const std::string &command) {} virtual void debug_delete() {} }; class ProjectClang : public Project { public: ProjectClang(Notebook ¬ebook) : Project(notebook) {} std::unique_ptr get_cmake(); std::pair get_run_arguments() override; void compile() override; void compile_and_run() override; std::pair debug_get_run_arguments() override; std::mutex debug_start_mutex; void debug_start(std::function status_callback, std::function stop_callback) override; void debug_continue() override; void debug_stop() override; void debug_kill() override; void debug_step_over() override; void debug_step_into() override; void debug_step_out() override; void debug_backtrace() override; void debug_show_variables() override; void debug_run_command(const std::string &command) override; void debug_delete() override; }; class ProjectMarkdown : public Project { public: ProjectMarkdown(Notebook ¬ebook) : Project(notebook) {} ~ProjectMarkdown(); boost::filesystem::path last_temp_path; void compile_and_run() override; }; class ProjectPython : public Project { public: ProjectPython(Notebook ¬ebook) : Project(notebook) {} void compile_and_run() override; }; class ProjectJavaScript : public Project { public: ProjectJavaScript(Notebook ¬ebook) : Project(notebook) {} void compile_and_run() override; }; #endif // JUCI_PROJECT_H_