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

Go to the source code of this file.

Classes

class  string_ref
 This class implements a subset of the proposal for std::string_ref (proposed for the next c++ standard (c++1y)). More...
 

Functions

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

Function Documentation

◆ begin()

string_ref::const_iterator begin ( const string_ref x)
inline

Definition at line 160 of file string_ref.hh.

References string_ref::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(), 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(), 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_ref::const_iterator end ( const string_ref x)
inline

Definition at line 161 of file string_ref.hh.

References string_ref::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< std::string, openmsx::CommandCompleter *, 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< std::string, openmsx::CommandCompleter *, 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_ref  s)

◆ operator!=()

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

Definition at line 124 of file string_ref.hh.

◆ operator+() [1/3]

std::string operator+ ( string_ref  x,
string_ref  y 
)

Definition at line 162 of file string_ref.cc.

Referenced by operator>=().

◆ operator+() [2/3]

std::string operator+ ( char  x,
string_ref  y 
)

Definition at line 170 of file string_ref.cc.

◆ operator+() [3/3]

std::string operator+ ( string_ref  x,
char  y 
)

Definition at line 178 of file string_ref.cc.

◆ operator<()

bool operator< ( string_ref  x,
string_ref  y 
)

Definition at line 138 of file string_ref.cc.

◆ operator<<()

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

Definition at line 188 of file string_ref.cc.

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

Referenced by operator>=().

◆ operator<=()

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

Definition at line 126 of file string_ref.hh.

◆ operator==()

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

◆ operator>()

bool operator> ( string_ref  x,
string_ref  y 
)
inline

Definition at line 125 of file string_ref.hh.

◆ operator>=()

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

Definition at line 127 of file string_ref.hh.

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