summaryrefslogtreecommitdiffhomepage
path: root/Sources/AsmKit.cc
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-07-28 16:12:39 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-07-28 16:12:39 +0000
commit6f54c8fb68063ffac8ff88bb146914df28cb8134 (patch)
treeb1fa96a4211a1563b3ebc7724aa3c281ea8fa56f /Sources/AsmKit.cc
parent7a6ac1d9cd3128a9ef96bf675a06963a617b5673 (diff)
parent231899b44a7294bb968c2a930c97f76990376f41 (diff)
Merged in MHR-36 (pull request #6)
MHR-36
Diffstat (limited to 'Sources/AsmKit.cc')
-rw-r--r--Sources/AsmKit.cc51
1 files changed, 0 insertions, 51 deletions
diff --git a/Sources/AsmKit.cc b/Sources/AsmKit.cc
deleted file mode 100644
index b4af817..0000000
--- a/Sources/AsmKit.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -------------------------------------------
-
- Copyright Mahrouss Logic
-
-------------------------------------------- */
-
-#include <Headers/AsmKit/AsmKit.hpp>
-#include <Headers/StdKit/ErrorID.hpp>
-
-/**
- * @file AsmKit.cc
- * @author Amlal El Mahrouss (amlal@mahrouss.com)
- * @brief Assembler Kit
- * @version 0.1
- * @date 2024-01-27
- *
- * @copyright Copyright (c) 2024, Mahrouss Logic
- *
- */
-
-#include <iostream>
-
-//! @file AsmKit.cpp
-//! @brief AssemblyKit source implementation.
-
-namespace CompilerKit {
-//! @brief Compile for specific format (ELF, PEF, ZBIN)
-Int32 AssemblyFactory::Compile(std::string& sourceFile,
- const Int32& arch) noexcept {
- if (sourceFile.length() < 1 || !fMounted) return MPCC_UNIMPLEMENTED;
-
- return fMounted->CompileToFormat(sourceFile, arch);
-}
-
-//! @brief mount assembly backend.
-void AssemblyFactory::Mount(AssemblyInterface* mountPtr) noexcept {
- if (mountPtr) {
- fMounted = mountPtr;
- }
-}
-
-AssemblyInterface* AssemblyFactory::Unmount() noexcept {
- auto mount_prev = fMounted;
-
- if (mount_prev) {
- fMounted = nullptr;
- }
-
- return mount_prev;
-}
-} // namespace CompilerKit