diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2023-01-21 10:49:46 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2023-01-21 10:49:46 -0500 |
commit | df114682bf8ea175eb22d0e2812237d7934cf917 (patch) | |
tree | a22341d9d89177c44d301164784e723f5941fa63 | |
parent | 0b9b5e62e886f9e7e7c17d558876f59f6a6e8c73 (diff) |
-rw-r--r-- | source/code.hpp | 39 | ||||
-rw-r--r-- | source/gui_help.hpp | 19 | ||||
-rw-r--r-- | source/main.hpp | 20 |
3 files changed, 78 insertions, 0 deletions
diff --git a/source/code.hpp b/source/code.hpp new file mode 100644 index 0000000..edb46e7 --- /dev/null +++ b/source/code.hpp @@ -0,0 +1,39 @@ +/** + * @file code.hpp + * @brief Functionality for compiling and disassembling source code. + * + * Copyright (C) 2022 Clyne Sullivan + * + * Distributed under the GNU GPL v3 or later. You should have received a copy of + * the GNU General Public License along with this program. + * If not, see <https://www.gnu.org/licenses/>. + */ + +#ifndef STMDSPGUI_CODE_HPP +#define STMDSPGUI_CODE_HPP + +#include <fstream> +#include <istream> +#include <string> + +/** + * Attempts to open the most recently created binary file. + * @return An opened stream of the file if it exists, an empty stream otherwise. + */ +std::ifstream compileOpenBinaryFile(); + +/** + * Attempts to compile the given C++ algorithm code into a binary. + * Errors are reported to the log view. + * @param code The C++ code for the algorithm (usually from the text editor). + */ +void compileEditorCode(const std::string& code); + +/** + * Disassembles the most recently compiled binary, outputting the results to + * the log view. + */ +void disassembleCode(); + +#endif // STMDSPGUI_CODE_HPP + diff --git a/source/gui_help.hpp b/source/gui_help.hpp new file mode 100644 index 0000000..89c00ec --- /dev/null +++ b/source/gui_help.hpp @@ -0,0 +1,19 @@ +/** + * @file gui_help.hpp + * @brief Defines the "Help" menu and provides its functionality. + * + * Copyright (C) 2022 Clyne Sullivan + * + * Distributed under the GNU GPL v3 or later. You should have received a copy of + * the GNU General Public License along with this program. + * If not, see <https://www.gnu.org/licenses/>. + */ + +#ifndef STMDSPGUI_GUI_HELP +#define STMDSPGUI_GUI_HELP + +void helpRenderMenu(); +void helpRenderDialog(); + +#endif // STMDSPGUI_GUI_HELP + diff --git a/source/main.hpp b/source/main.hpp new file mode 100644 index 0000000..921d1ef --- /dev/null +++ b/source/main.hpp @@ -0,0 +1,20 @@ +/** + * @file main.hpp + * @brief Common functions. + * + * Copyright (C) 2022 Clyne Sullivan + * + * Distributed under the GNU GPL v3 or later. You should have received a copy of + * the GNU General Public License along with this program. + * If not, see <https://www.gnu.org/licenses/>. + */ + +#ifndef STMDSPGUI_MAIN_HPP +#define STMDSPGUI_MAIN_HPP + +#include <string> + +void log(const std::string& str); + +#endif // STMDSPGUI_MAIN_HPP + |