gsc-tool/src/iw5/xsk/resolver.hpp

37 lines
1.2 KiB
C++
Raw Normal View History

2020-05-21 07:32:38 -04:00
// Copyright 2021 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::iw5
{
class resolver
{
public:
static auto opcode_id(const std::string& name) -> std::uint8_t;
static auto opcode_name(std::uint8_t id) -> std::string;
static auto function_id(const std::string& name) -> std::uint16_t;
static auto function_name(std::uint16_t id) -> std::string;
static auto method_id(const std::string& name) -> std::uint16_t;
static auto method_name(std::uint16_t id) -> std::string;
static auto file_id(const std::string& name) -> std::uint16_t;
static auto file_name(std::uint16_t id) -> std::string;
static auto token_id(const std::string& name) -> std::uint16_t;
static auto token_name(std::uint16_t id) -> std::string;
static auto find_function(const std::string& name) -> bool;
static auto find_method(const std::string& name) -> bool;
2021-05-20 14:53:23 -04:00
static void add_function(const std::string& name, std::uint16_t id);
static void add_method(const std::string& name, std::uint16_t id);
2020-05-21 07:32:38 -04:00
};
} // namespace xsk::gsc::iw5