openMSX
Public Types | Public Member Functions | Static Public Member Functions | List of all members
openmsx::SymbolManager Class Reference

#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)
 
void removeFile (std::string_view filename)
 
void removeAllFiles ()
 
const auto & getFiles () const
 
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)
 
static std::optional< uint16_t > parseValue (std::string_view str)
 
static std::optional< SymbolcheckLabel (std::string_view label, uint16_t value)
 
static std::optional< SymbolcheckLabelAndValue (std::string_view label, std::string_view value)
 
static SymbolFile::Type detectType (const std::string &filename, std::string_view buffer)
 
static SymbolFile loadLines (const std::string &filename, std::string_view buffer, SymbolFile::Type type, function_ref< std::optional< Symbol >(std::span< std::string_view >)> lineParser)
 
static SymbolFile loadGeneric (const std::string &filename, std::string_view buffer)
 
static SymbolFile loadNoICE (const std::string &filename, std::string_view buffer)
 
static SymbolFile loadHTC (const std::string &filename, std::string_view buffer)
 
static SymbolFile loadVASM (const std::string &filename, std::string_view buffer)
 
static SymbolFile loadASMSX (const std::string &filename, std::string_view buffer)
 
static SymbolFile loadLinkMap (const std::string &filename, std::string_view buffer)
 
static SymbolFile loadSymbolFile (const std::string &filename, SymbolFile::Type type)
 

Detailed Description

Definition at line 55 of file SymbolManager.hh.

Member Enumeration Documentation

◆ LoadEmpty

Enumerator
ALLOWED 
NOT_ALLOWED 

Definition at line 71 of file SymbolManager.hh.

Constructor & Destructor Documentation

◆ SymbolManager()

openmsx::SymbolManager::SymbolManager ( CommandController commandController)
explicit

Definition at line 49 of file SymbolManager.cc.

Member Function Documentation

◆ checkLabel()

std::optional< Symbol > openmsx::SymbolManager::checkLabel ( std::string_view  label,
uint16_t  value 
)
static

Definition at line 135 of file SymbolManager.cc.

Referenced by checkLabelAndValue(), loadHTC(), loadVASM(), and TEST_CASE().

◆ checkLabelAndValue()

std::optional< Symbol > openmsx::SymbolManager::checkLabelAndValue ( std::string_view  label,
std::string_view  value 
)
static

Definition at line 143 of file SymbolManager.cc.

References checkLabel(), and parseValue().

Referenced by loadASMSX(), loadGeneric(), loadNoICE(), and TEST_CASE().

◆ detectType()

SymbolFile::Type openmsx::SymbolManager::detectType ( const std::string &  filename,
std::string_view  buffer 
)
static

◆ getFileFilters()

std::string openmsx::SymbolManager::getFileFilters ( )
static

Definition at line 453 of file SymbolManager.cc.

Referenced by openmsx::ImGuiSymbols::paint().

◆ getFiles()

const auto & openmsx::SymbolManager::getFiles ( ) const
inline

◆ getTypeForFilter()

SymbolFile::Type openmsx::SymbolManager::getTypeForFilter ( std::string_view  filter)
static

Definition at line 466 of file SymbolManager.cc.

Referenced by openmsx::ImGuiSymbols::paint().

◆ is4DigitHex()

std::optional< uint16_t > openmsx::SymbolManager::is4DigitHex ( std::string_view  s)
static

Definition at line 275 of file SymbolManager.cc.

References isHexDigit().

Referenced by loadLinkMap(), and TEST_CASE().

◆ isHexDigit()

std::optional< unsigned > openmsx::SymbolManager::isHexDigit ( char  c)
static

Definition at line 268 of file SymbolManager.cc.

Referenced by is4DigitHex(), and TEST_CASE().

◆ loadASMSX()

SymbolFile openmsx::SymbolManager::loadASMSX ( const std::string &  filename,
std::string_view  buffer 
)
static

◆ loadGeneric()

SymbolFile openmsx::SymbolManager::loadGeneric ( const std::string &  filename,
std::string_view  buffer 
)
static

Definition at line 151 of file SymbolManager.cc.

References checkLabelAndValue(), openmsx::SymbolFile::GENERIC, and loadLines().

Referenced by loadSymbolFile(), and TEST_CASE().

◆ loadHTC()

SymbolFile openmsx::SymbolManager::loadHTC ( const std::string &  filename,
std::string_view  buffer 
)
static

Definition at line 180 of file SymbolManager.cc.

References checkLabel(), openmsx::SymbolFile::HTC, and loadLines().

Referenced by loadSymbolFile(), and TEST_CASE().

◆ loadLines()

SymbolFile openmsx::SymbolManager::loadLines ( const std::string &  filename,
std::string_view  buffer,
SymbolFile::Type  type,
function_ref< std::optional< Symbol >(std::span< std::string_view >)>  lineParser 
)
static

◆ loadLinkMap()

SymbolFile openmsx::SymbolManager::loadLinkMap ( const std::string &  filename,
std::string_view  buffer 
)
static

◆ loadNoICE()

SymbolFile openmsx::SymbolManager::loadNoICE ( const std::string &  filename,
std::string_view  buffer 
)
static

Definition at line 166 of file SymbolManager.cc.

References checkLabelAndValue(), loadLines(), and openmsx::SymbolFile::NOICE.

Referenced by loadSymbolFile(), and TEST_CASE().

◆ loadSymbolFile()

SymbolFile openmsx::SymbolManager::loadSymbolFile ( const std::string &  filename,
SymbolFile::Type  type 
)
static

◆ loadVASM()

SymbolFile openmsx::SymbolManager::loadVASM ( const std::string &  filename,
std::string_view  buffer 
)
static

◆ lookupValue()

std::span< Symbol const *const > openmsx::SymbolManager::lookupValue ( uint16_t  value)

Definition at line 437 of file SymbolManager.cc.

◆ parseSymbolOrValue()

std::optional< uint16_t > openmsx::SymbolManager::parseSymbolOrValue ( std::string_view  s) const

Definition at line 415 of file SymbolManager.cc.

References ranges::find(), ranges::find_if(), and openmsx::Symbol::name.

◆ parseValue()

std::optional< uint16_t > openmsx::SymbolManager::parseValue ( std::string_view  str)
static

Definition at line 114 of file SymbolManager.cc.

Referenced by checkLabelAndValue(), and TEST_CASE().

◆ reloadFile()

bool openmsx::SymbolManager::reloadFile ( const std::string &  filename,
LoadEmpty  loadEmpty,
SymbolFile::Type  type 
)

◆ removeAllFiles()

void openmsx::SymbolManager::removeAllFiles ( )

Definition at line 409 of file SymbolManager.cc.

Referenced by openmsx::ImGuiSymbols::loadStart().

◆ removeFile()

void openmsx::SymbolManager::removeFile ( std::string_view  filename)

Definition at line 401 of file SymbolManager.cc.

References openmsx::SymbolFile::filename, and ranges::find().

◆ setObserver()

void openmsx::SymbolManager::setObserver ( SymbolObserver observer_)
inline

The documentation for this class was generated from the following files: