context wrappers
This commit is contained in:
@ -16,7 +16,6 @@ public:
|
||||
virtual ~compiler() = default;
|
||||
virtual auto output() -> std::vector<gsc::function::ptr> = 0;
|
||||
virtual void compile(const std::string& file, std::vector<std::uint8_t>& data) = 0;
|
||||
virtual void read_callback(std::function<std::vector<std::uint8_t>(const std::string&)> func) = 0;
|
||||
};
|
||||
|
||||
} // namespace xsk::gsc
|
||||
|
26
src/utils/xsk/gsc/interfaces/context.hpp
Normal file
26
src/utils/xsk/gsc/interfaces/context.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright 2022 xensik. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a GNU GPLv3 license
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace xsk::gsc
|
||||
{
|
||||
|
||||
class context
|
||||
{
|
||||
public:
|
||||
using ptr = std::unique_ptr<context>;
|
||||
|
||||
virtual ~context() = default;
|
||||
virtual void init(build mode, read_cb_type callback) = 0;
|
||||
virtual void cleanup() = 0;
|
||||
|
||||
virtual auto assembler() -> assembler& = 0;
|
||||
virtual auto disassembler() -> disassembler& = 0;
|
||||
virtual auto compiler() -> compiler& = 0;
|
||||
virtual auto decompiler() -> decompiler& = 0;
|
||||
};
|
||||
|
||||
} // namespace xsk::gsc
|
@ -8,6 +8,8 @@
|
||||
namespace xsk::gsc
|
||||
{
|
||||
|
||||
using read_cb_type = std::function<std::vector<std::uint8_t>(const std::string&)>;
|
||||
|
||||
enum class build
|
||||
{
|
||||
dev,
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "gsc/interfaces/disassembler.hpp"
|
||||
#include "gsc/interfaces/compiler.hpp"
|
||||
#include "gsc/interfaces/decompiler.hpp"
|
||||
#include "gsc/interfaces/context.hpp"
|
||||
|
||||
// ARC Types
|
||||
#include "arc/location.hpp"
|
||||
|
Reference in New Issue
Block a user