openMSX
|
#include <SymbolManager.hh>
Public Types | |
enum class | LoadEmpty { ALLOWED , NOT_ALLOWED } |
Public Member Functions | |
SymbolManager (CommandController &commandController) | |
void | setObserver (SymbolObserver *observer_) |
bool | reloadFile (const std::string &filename, LoadEmpty loadEmpty, SymbolFile::Type type, std::optional< uint8_t > slot={}) |
void | removeFile (std::string_view filename) |
void | removeAllFiles () |
const auto & | getFiles () const |
SymbolFile * | findFile (std::string_view filename) |
std::span< Symbol const *const > | lookupValue (uint16_t value) |
std::optional< uint16_t > | parseSymbolOrValue (std::string_view s) const |
Static Public Member Functions | |
static std::string | getFileFilters () |
static SymbolFile::Type | getTypeForFilter (std::string_view filter) |
static std::optional< unsigned > | isHexDigit (char c) |
static std::optional< uint16_t > | is4DigitHex (std::string_view s) |
template<typename T > | |
static std::optional< T > | parseValue (std::string_view str) |
static std::optional< Symbol > | checkLabel (std::string_view label, uint32_t value) |
static std::optional< Symbol > | checkLabelAndValue (std::string_view label, std::string_view value) |
static std::optional< Symbol > | checkLabelSegmentAndValue (std::string_view label, std::string_view value) |
static SymbolFile::Type | detectType (std::string_view filename, std::string_view buffer) |
static SymbolFile | loadLines (std::string_view filename, std::string_view buffer, SymbolFile::Type type, function_ref< std::optional< Symbol >(std::span< std::string_view >)> lineParser) |
static SymbolFile | loadGeneric (std::string_view filename, std::string_view buffer) |
static SymbolFile | loadNoICE (std::string_view filename, std::string_view buffer) |
static SymbolFile | loadHTC (std::string_view filename, std::string_view buffer) |
static SymbolFile | loadVASM (std::string_view filename, std::string_view buffer) |
static SymbolFile | loadNoGmb (std::string_view filename, std::string_view buffer) |
static SymbolFile | loadASMSX (std::string_view filename, std::string_view buffer) |
static SymbolFile | loadLinkMap (std::string_view filename, std::string_view buffer) |
static SymbolFile | loadSymbolFile (const std::string &filename, SymbolFile::Type type, std::optional< uint8_t > slot={}) |
Definition at line 64 of file SymbolManager.hh.
|
strong |
Enumerator | |
---|---|
ALLOWED | |
NOT_ALLOWED |
Definition at line 80 of file SymbolManager.hh.
|
explicit |
Definition at line 53 of file SymbolManager.cc.
|
static |
Definition at line 152 of file SymbolManager.cc.
Referenced by checkLabelAndValue(), checkLabelSegmentAndValue(), loadHTC(), loadNoGmb(), loadVASM(), and TEST_CASE().
|
static |
Definition at line 161 of file SymbolManager.cc.
References checkLabel().
Referenced by loadASMSX(), loadGeneric(), and TEST_CASE().
|
static |
Definition at line 169 of file SymbolManager.cc.
References checkLabel().
Referenced by loadNoICE(), and TEST_CASE().
|
static |
Definition at line 59 of file SymbolManager.cc.
References StringOp::containsCaseInsensitive(), StringOp::splitOnFirst(), and StringOp::toLower().
Referenced by loadSymbolFile(), and TEST_CASE().
SymbolFile * openmsx::SymbolManager::findFile | ( | std::string_view | filename | ) |
Definition at line 518 of file SymbolManager.cc.
References ranges::find().
Referenced by openmsx::ImGuiSymbols::paint().
|
static |
Definition at line 527 of file SymbolManager.cc.
Referenced by openmsx::ImGuiSymbols::paint().
|
inline |
Definition at line 86 of file SymbolManager.hh.
Referenced by openmsx::SymbolRef::file(), openmsx::SymbolRef::name(), openmsx::ImGuiSymbols::paint(), openmsx::ImGuiSymbols::save(), openmsx::SymbolRef::segment(), openmsx::SymbolRef::slot(), and openmsx::SymbolRef::value().
|
static |
Definition at line 541 of file SymbolManager.cc.
Referenced by openmsx::ImGuiSymbols::paint().
|
static |
Definition at line 327 of file SymbolManager.cc.
References isHexDigit().
Referenced by loadLinkMap(), and TEST_CASE().
|
static |
Definition at line 320 of file SymbolManager.cc.
Referenced by is4DigitHex(), and TEST_CASE().
|
static |
Definition at line 280 of file SymbolManager.cc.
References openmsx::SymbolFile::ASMSX, checkLabelAndValue(), openmsx::SymbolFile::filename, from_range, StringOp::split_view(), StringOp::splitOnFirst(), openmsx::SymbolFile::symbols, view::take(), and openmsx::SymbolFile::type.
Referenced by loadSymbolFile(), and TEST_CASE().
|
static |
Definition at line 177 of file SymbolManager.cc.
References checkLabelAndValue(), openmsx::SymbolFile::GENERIC, and loadLines().
Referenced by loadSymbolFile(), and TEST_CASE().
|
static |
Definition at line 218 of file SymbolManager.cc.
References checkLabel(), openmsx::SymbolFile::HTC, and loadLines().
Referenced by loadSymbolFile(), and TEST_CASE().
|
static |
Definition at line 104 of file SymbolManager.cc.
References openmsx::SymbolFile::filename, from_range, StringOp::split_view(), StringOp::splitOnFirst(), openmsx::SymbolFile::symbols, view::take(), and openmsx::SymbolFile::type.
Referenced by loadGeneric(), loadHTC(), loadNoGmb(), loadNoICE(), and TEST_CASE().
|
static |
Definition at line 339 of file SymbolManager.cc.
References openmsx::SymbolFile::filename, is4DigitHex(), openmsx::SymbolFile::LINKMAP, StringOp::split_view(), openmsx::SymbolFile::symbols, and openmsx::SymbolFile::type.
Referenced by loadSymbolFile(), and TEST_CASE().
|
static |
Definition at line 266 of file SymbolManager.cc.
References checkLabel(), loadLines(), and openmsx::SymbolFile::WLALINK_NOGMB.
Referenced by loadSymbolFile(), and TEST_CASE().
|
static |
Definition at line 193 of file SymbolManager.cc.
References checkLabelSegmentAndValue(), loadLines(), and openmsx::SymbolFile::NOICE.
Referenced by loadSymbolFile(), TEST_CASE(), and TEST_CASE().
|
static |
Definition at line 392 of file SymbolManager.cc.
References detectType(), loadASMSX(), loadGeneric(), loadHTC(), loadLinkMap(), loadNoGmb(), loadNoICE(), loadVASM(), openmsx::File::mmap(), and UNREACHABLE.
Referenced by reloadFile().
|
static |
Definition at line 234 of file SymbolManager.cc.
References checkLabel(), openmsx::SymbolFile::filename, from_range, StringOp::split_view(), openmsx::SymbolFile::symbols, view::take(), openmsx::SymbolFile::type, and openmsx::SymbolFile::VASM.
Referenced by loadSymbolFile(), and TEST_CASE().
std::span< Symbol const *const > openmsx::SymbolManager::lookupValue | ( | uint16_t | value | ) |
Definition at line 502 of file SymbolManager.cc.
std::optional< uint16_t > openmsx::SymbolManager::parseSymbolOrValue | ( | std::string_view | s | ) | const |
Definition at line 480 of file SymbolManager.cc.
References ranges::find(), ranges::find_if(), and openmsx::Symbol::name.
|
static |
Definition at line 127 of file SymbolManager.cc.
bool openmsx::SymbolManager::reloadFile | ( | const std::string & | filename, |
LoadEmpty | loadEmpty, | ||
SymbolFile::Type | type, | ||
std::optional< uint8_t > | slot = {} |
||
) |
Definition at line 451 of file SymbolManager.cc.
References openmsx::SymbolFile::filename, ranges::find(), loadSymbolFile(), and NOT_ALLOWED.
void openmsx::SymbolManager::removeAllFiles | ( | ) |
Definition at line 474 of file SymbolManager.cc.
Referenced by openmsx::ImGuiSymbols::loadStart().
void openmsx::SymbolManager::removeFile | ( | std::string_view | filename | ) |
Definition at line 466 of file SymbolManager.cc.
References openmsx::SymbolFile::filename, and ranges::find().
Referenced by openmsx::ImGuiSymbols::paint().
|
inline |
Definition at line 69 of file SymbolManager.hh.
Referenced by openmsx::ImGuiSymbols::ImGuiSymbols(), and openmsx::ImGuiSymbols::~ImGuiSymbols().