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 (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 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)
 

Detailed Description

Definition at line 58 of file SymbolManager.hh.

Member Enumeration Documentation

◆ LoadEmpty

Enumerator
ALLOWED 
NOT_ALLOWED 

Definition at line 74 of file SymbolManager.hh.

Constructor & Destructor Documentation

◆ SymbolManager()

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

Definition at line 51 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 138 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 146 of file SymbolManager.cc.

References checkLabel(), and parseValue().

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

◆ detectType()

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

◆ getFileFilters()

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

Definition at line 456 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 469 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 277 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 270 of file SymbolManager.cc.

Referenced by is4DigitHex(), and TEST_CASE().

◆ loadASMSX()

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

◆ loadGeneric()

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

Definition at line 154 of file SymbolManager.cc.

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

Referenced by loadSymbolFile(), and TEST_CASE().

◆ loadHTC()

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

Definition at line 182 of file SymbolManager.cc.

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

Referenced by loadSymbolFile(), and TEST_CASE().

◆ loadLines()

SymbolFile openmsx::SymbolManager::loadLines ( std::string_view  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 ( std::string_view  filename,
std::string_view  buffer 
)
static

◆ loadNoICE()

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

Definition at line 169 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 ( std::string_view  filename,
std::string_view  buffer 
)
static

◆ lookupValue()

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

Definition at line 440 of file SymbolManager.cc.

◆ parseSymbolOrValue()

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

Definition at line 418 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 117 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 412 of file SymbolManager.cc.

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

◆ removeFile()

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

Definition at line 404 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: