openMSX
Classes | Functions
string_view.hh File Reference
#include <string>
#include <iterator>
#include <iosfwd>
#include <cassert>
#include <cstring>
Include dependency graph for string_view.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  string_view
 This class implements a (close approximation) of the std::string_view class. More...
 

Functions

bool operator== (string_view x, string_view y)
 
bool operator< (string_view x, string_view y)
 
bool operator!= (string_view x, string_view y)
 
bool operator> (string_view x, string_view y)
 
bool operator<= (string_view x, string_view y)
 
bool operator>= (string_view x, string_view y)
 
unsigned fast_stou (string_view s)
 
std::ostream & operator<< (std::ostream &os, string_view s)
 
string_view::const_iterator begin (const string_view &x)
 
string_view::const_iterator end (const string_view &x)
 

Function Documentation

◆ begin()

string_view::const_iterator begin ( const string_view x)
inline

Definition at line 152 of file string_view.hh.

References string_view::begin().

Referenced by openmsx::MSXMultiMemDevice::add(), openmsx::Display::addLayer(), openmsx::TclObject::addListElements(), openmsx::OSDWidget::addWidget(), openmsx::AmdFlash::AmdFlash(), openmsx::MSXCPUInterface::checkBreakPoints(), openmsx::CommandLineParser::CommandLineParser(), openmsx::Completer::Completer(), contains(), strCatImpl::ConcatIntegral< T >::copy(), openmsx::IPSPatch::copyBlock(), openmsx::LastDeltaBlocks::createNew(), openmsx::LastDeltaBlocks::createNullDiff(), openmsx::HardwareConfig::createRomConfig(), openmsx::RawTrack::decodeAll(), openmsx::EnumSettingBase::EnumSettingBase(), openmsx::AfterCommand::execute(), openmsx::RomDatabase::fetchRomInfo(), openmsx::Completer::filter(), find_if_unguarded(), find_unguarded(), openmsx::Display::findActiveLayer(), openmsx::MSXMixer::findDevice(), openmsx::MSXMotherBoard::findExtension(), openmsx::Debugger::findProbe(), openmsx::Completer::formatListInColumns(), openmsx::EnumSettingBase::fromStringBase(), openmsx::TTFFontPool::get(), openmsx::UnicodeKeymap::get(), openmsx::OggReader::getAudio(), openmsx::RomInfo::getBlockSize(), openmsx::OggReader::getChapter(), openmsx::Keys::getCode(), openmsx::ResampleCoeffs::getCoeffs(), openmsx::FileOperations::getConventionalPath(), openmsx::UnicodeKeymap::getDeadkey(), openmsx::RomInfo::getDescription(), openmsx::WatchIO::getDevice(), openmsx::FilePool::getFile(), openmsx::AviRecorder::getFrameHeight(), openmsx::HDImageCLI::getImageForId(), openmsx::Completer::getName(), openmsx::FileOperations::getNativePath(), openmsx::OSDText::getProperties(), openmsx::OSDRectangle::getProperties(), openmsx::OSDImageBasedWidget::getProperties(), openmsx::OSDWidget::getProperties(), openmsx::MSXMotherBoard::getUserName(), openmsx::MSXDevice::getVisibleMemRegion(), openmsx::MemoryOps::AllocMap::insert(), openmsx::MSXCPUInterface::insertBreakPoint(), openmsx::PolymorphicSaverRegistry< Archive >::instance(), openmsx::IPSPatch::IPSPatch(), openmsx::CartridgeSlotManager::isExternalSlot(), openmsx::ClockPin::isPeriodic(), StringOp::join(), openmsx::MSXMixer::needStereoRecording(), strCatImpl::ConcatIntegral< T >::operator std::string(), openmsx::CollectionSaver< TC >::operator()(), openmsx::CommandLineParser::parse(), openmsx::EventDistributor::registerEventListener(), openmsx::CommandLineParser::registerFileType(), openmsx::MSXCPUInterface::removeBreakPoint(), openmsx::XMLElement::removeChild(), openmsx::Display::removeLayer(), openmsx::MSXCPUInterface::removeWatchPoint(), circular_buffer< std::unique_ptr< openmsx::Frame > >::rend(), openmsx::HotKey::saveBindings(), openmsx::OggReader::seek(), circular_buffer< std::unique_ptr< openmsx::Frame > >::set_capacity(), utf8::unchecked::size(), openmsx::OggReader::stopFrame(), openmsx::ConsoleLine::substr(), utf8::unchecked::substr(), openmsx::Reactor::switchMachine(), openmsx::GlobalCommandController::tabCompletion(), openmsx::MSXDevice::testRemove(), openmsx::MSXCPUInterface::testUnsetExpanded(), openmsx::DBParser::text(), StringOp::toLower(), openmsx::DiskManipulator::unregisterDrive(), openmsx::GlobalCommandController::unregisterProxyCommand(), openmsx::Interpreter::unregisterSetting(), openmsx::GLPostProcessor::update(), openmsx::NowindHost::write(), openmsx::RawTrack::write(), openmsx::FilePool::~FilePool(), openmsx::OSDConsoleRenderer::~OSDConsoleRenderer(), openmsx::ReverseManager::~ReverseManager(), and openmsx::Scheduler::~Scheduler().

◆ end()

string_view::const_iterator end ( const string_view x)
inline

Definition at line 153 of file string_view.hh.

References string_view::end().

Referenced by openmsx::XMLElement::addAttribute(), openmsx::Display::addLayer(), openmsx::TclObject::addListElements(), openmsx::InputArchiveBase2::addPointer(), openmsx::AviRecorder::addWave(), openmsx::AmdFlash::AmdFlash(), hash_set< openmsx::ProbeBase *, NameFromProbe, XXHasher >::begin(), openmsx::MSXCPUInterface::checkBreakPoints(), openmsx::CommandLineParser::CommandLineParser(), openmsx::Completer::Completer(), contains(), openmsx::IPSPatch::copyBlock(), openmsx::LastDeltaBlocks::createNew(), openmsx::LastDeltaBlocks::createNullDiff(), openmsx::HardwareConfig::createRomConfig(), openmsx::RawTrack::decodeAll(), openmsx::EnumSettingBase::EnumSettingBase(), openmsx::AfterCommand::execute(), openmsx::RomDatabase::fetchRomInfo(), openmsx::CasImage::fillBuffer(), openmsx::Completer::filter(), find_if_unguarded(), find_unguarded(), openmsx::Display::findActiveLayer(), openmsx::XMLElement::findAttributeInt(), openmsx::OSDTopWidget::findByName(), openmsx::MSXCommandController::findCommand(), openmsx::Debugger::findDebuggable(), openmsx::MSXMixer::findDevice(), openmsx::MSXMotherBoard::findExtension(), openmsx::Debugger::findProbe(), openmsx::SettingsManager::findSetting(), openmsx::Completer::formatListInColumns(), openmsx::EnumSettingBase::fromStringBase(), openmsx::TTFFontPool::get(), openmsx::UnicodeKeymap::get(), openmsx::XMLElement::getAttribute(), openmsx::XMLElement::getAttributeAsBool(), openmsx::XMLElement::getAttributeAsInt(), openmsx::OggReader::getAudio(), openmsx::RomInfo::getBlockSize(), openmsx::OggReader::getChapter(), openmsx::Keys::getCode(), openmsx::ResampleCoeffs::getCoeffs(), openmsx::FileOperations::getConventionalPath(), openmsx::UnicodeKeymap::getDeadkey(), openmsx::RomInfo::getDescription(), openmsx::ImagePrinterMSX::getDescription(), openmsx::FilePool::getFile(), openmsx::AviRecorder::getFrameHeight(), openmsx::HDImageCLI::getImageForId(), openmsx::Completer::getName(), openmsx::FileOperations::getNativePath(), openmsx::InputArchiveBase2::getPointer(), openmsx::OSDText::getProperties(), openmsx::OSDRectangle::getProperties(), openmsx::OSDImageBasedWidget::getProperties(), openmsx::OSDWidget::getProperties(), openmsx::FilePool::getSha1Sum(), openmsx::MSXMotherBoard::getUserName(), openmsx::MSXDevice::getVisibleMemRegion(), openmsx::XMLElement::hasAttribute(), openmsx::GlobalCommandController::hasCommand(), openmsx::PolymorphicInitializerRegistry< Archive >::init(), openmsx::MemoryOps::AllocMap::insert(), hash_map< string_view, std::weak_ptr< void >, XXHasher >::insert_or_assign(), openmsx::MSXCPUInterface::insertBreakPoint(), openmsx::PolymorphicSaverRegistry< Archive >::instance(), openmsx::IPSPatch::IPSPatch(), utf8::is_valid(), openmsx::CartridgeSlotManager::isExternalSlot(), openmsx::ClockPin::isPeriodic(), StringOp::join(), openmsx::PolymorphicLoaderRegistry< Archive >::load(), openmsx::RomInfo::nameToRomType(), openmsx::MSXMixer::needStereoRecording(), openmsx::Scale_1on2< Pixel >::operator()(), openmsx::CollectionSaver< TC >::operator()(), hash_map< string_view, std::weak_ptr< void >, XXHasher >::operator[](), openmsx::CommandLineParser::parse(), openmsx::ImagePrinter::printVisibleCharacter(), utf8::prior(), circular_buffer< std::unique_ptr< openmsx::Frame > >::rbegin(), openmsx::DiskManipulator::registerDrive(), openmsx::EventDistributor::registerEventListener(), openmsx::CommandLineParser::registerFileType(), openmsx::GlobalCommandController::registerProxyCommand(), openmsx::GlobalCommandController::registerProxySetting(), openmsx::XMLElement::removeAttribute(), openmsx::MSXCPUInterface::removeBreakPoint(), openmsx::XMLElement::removeChild(), openmsx::Display::removeLayer(), openmsx::OSDTopWidget::removeName(), openmsx::MSXCPUInterface::removeWatchPoint(), openmsx::Display::repaint(), openmsx::InputArchiveBase2::resetSharedPtr(), openmsx::HotKey::saveBindings(), openmsx::OggReader::seek(), openmsx::XMLElement::setAttribute(), utf8::unchecked::size(), openmsx::OggReader::stopFrame(), openmsx::ConsoleLine::substr(), utf8::unchecked::substr(), openmsx::Reactor::switchMachine(), openmsx::GlobalCommandController::tabCompletion(), openmsx::MSXDevice::testRemove(), openmsx::MSXCPUInterface::testUnsetExpanded(), openmsx::DBParser::text(), StringOp::toLower(), openmsx::TigerHash::toString(), openmsx::DiskManipulator::unregisterDrive(), openmsx::GlobalCommandController::unregisterProxyCommand(), openmsx::GlobalCommandController::unregisterProxySetting(), openmsx::Interpreter::unregisterSetting(), openmsx::InfoCommand::unregisterTopic(), openmsx::MSXCliComm::update(), openmsx::GlobalCliComm::update(), openmsx::GLPostProcessor::update(), openmsx::RawTrack::updateCrc(), openmsx::WavImage::WavImage(), openmsx::NowindHost::write(), openmsx::RawTrack::write(), openmsx::CompressedFileAdapter::~CompressedFileAdapter(), openmsx::FilePool::~FilePool(), openmsx::OSDConsoleRenderer::~OSDConsoleRenderer(), openmsx::ReverseManager::~ReverseManager(), and openmsx::Scheduler::~Scheduler().

◆ fast_stou()

unsigned fast_stou ( string_view  s)

◆ operator!=()

bool operator!= ( string_view  x,
string_view  y 
)
inline

Definition at line 121 of file string_view.hh.

◆ operator<()

bool operator< ( string_view  x,
string_view  y 
)

Definition at line 138 of file string_view.cc.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
string_view  s 
)

Definition at line 160 of file string_view.cc.

References string_view::data(), and string_view::size().

Referenced by operator>=().

◆ operator<=()

bool operator<= ( string_view  x,
string_view  y 
)
inline

Definition at line 123 of file string_view.hh.

◆ operator==()

bool operator== ( string_view  x,
string_view  y 
)
inline

◆ operator>()

bool operator> ( string_view  x,
string_view  y 
)
inline

Definition at line 122 of file string_view.hh.

◆ operator>=()

bool operator>= ( string_view  x,
string_view  y 
)
inline

Definition at line 124 of file string_view.hh.

References fast_stou(), and operator<<().