diff options
| author | Amlal <amlal@nekernel.org> | 2025-05-07 09:18:33 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-05-07 09:18:33 +0200 |
| commit | d8d943929c25151fd6a8aadd6ea4cdbd5065845a (patch) | |
| tree | 137147035caca99ed27431039b65b9ab61546d35 /dev/LibCompiler/src/AssemblyFactory.cc | |
| parent | 23d3e00324b7f691a893df7e73462b9b73c03a4f (diff) | |
feat(LibCompiler): Reworking architecture to integrate the Arch() method in the AssemblyInterface.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src/AssemblyFactory.cc')
| -rw-r--r-- | dev/LibCompiler/src/AssemblyFactory.cc | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/dev/LibCompiler/src/AssemblyFactory.cc b/dev/LibCompiler/src/AssemblyFactory.cc deleted file mode 100644 index 8fa12a8..0000000 --- a/dev/LibCompiler/src/AssemblyFactory.cc +++ /dev/null @@ -1,51 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024-2025 Amlal EL Mahrous, all rights reserved - -------------------------------------------- */ - -#include <LibCompiler/AssemblyInterface.h> -#include <LibCompiler/ErrorID.h> - -/** - * @file AssemblyFactory.cxx - * @author amlal (amlal@nekernel.org) - * @brief Assembler Kit - * @version 0.1 - * @date 2024-01-27 - * - * @copyright Copyright (c) 2024-2025 Amlal El Mahrouss - * - */ - -#include <iostream> - -//! @file Asm.cpp -//! @brief AssemblyKit source implementation. - -namespace LibCompiler { -///! @brief Compile for specific format (ELF, PEF, ZBIN) -Int32 AssemblyFactory::Compile(std::string sourceFile, const Int32& arch) noexcept { - if (sourceFile.length() < 1 || !fMounted) return LIBCOMPILER_UNIMPLEMENTED; - - return fMounted->CompileToFormat(sourceFile, arch); -} - -///! @brief mount assembly backend. -void AssemblyFactory::Mount(AssemblyInterface* mountPtr) noexcept { - if (mountPtr) { - fMounted = mountPtr; - } -} - -///! @brief Unmount assembler. -AssemblyInterface* AssemblyFactory::Unmount() noexcept { - auto mount_prev = fMounted; - - if (mount_prev) { - fMounted = nullptr; - } - - return mount_prev; -} -} // namespace LibCompiler |
