openMSX
|
This class implements a subset of the proposal for std::array_ref (proposed for the next c++ standard (c++1y)). More...
#include <array_ref.hh>
Public Types | |
using | value_type = T |
using | pointer = const T * |
using | reference = const T & |
using | const_reference = const T & |
using | const_iterator = const T * |
using | iterator = const_iterator |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
using | reverse_iterator = const_reverse_iterator |
using | size_type = size_t |
using | difference_type = ptrdiff_t |
Public Member Functions | |
array_ref ()=default | |
array_ref (const array_ref &r) | |
array_ref (const T *array, size_t length) | |
template<typename ITER > | |
array_ref (ITER first, ITER last) | |
array_ref (const std::vector< T > &v) | |
template<size_t N> | |
array_ref (const T(&a)[N]) | |
array_ref & | operator= (const array_ref &rhs) |
const_iterator | begin () const |
const_iterator | end () const |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
size_type | size () const |
bool | empty () const |
const T & | operator[] (size_t i) const |
const T & | front () const |
const T & | back () const |
const T * | data () const |
void | clear () |
void | remove_prefix (size_type n) |
void | remove_suffix (size_type n) |
void | pop_back () |
void | pop_front () |
array_ref | substr (size_type pos, size_type n=size_type(-1)) const |
This class implements a subset of the proposal for std::array_ref (proposed for the next c++ standard (c++1y)).
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3334.html#classstd_1_1array__ref
It has an interface that is close to std::vector, but it does not own the memory of the array. Basically it's just a wrapper around a pointer plus length.
Definition at line 19 of file array_ref.hh.
using array_ref< T >::const_iterator = const T* |
Definition at line 27 of file array_ref.hh.
using array_ref< T >::const_reference = const T& |
Definition at line 26 of file array_ref.hh.
using array_ref< T >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 29 of file array_ref.hh.
using array_ref< T >::difference_type = ptrdiff_t |
Definition at line 32 of file array_ref.hh.
using array_ref< T >::iterator = const_iterator |
Definition at line 28 of file array_ref.hh.
Definition at line 24 of file array_ref.hh.
Definition at line 25 of file array_ref.hh.
using array_ref< T >::reverse_iterator = const_reverse_iterator |
Definition at line 30 of file array_ref.hh.
Definition at line 31 of file array_ref.hh.
using array_ref< T >::value_type = T |
Definition at line 23 of file array_ref.hh.
Referenced by array_ref< T >::substr().
Definition at line 36 of file array_ref.hh.
Definition at line 38 of file array_ref.hh.
|
inline |
Definition at line 40 of file array_ref.hh.
Definition at line 42 of file array_ref.hh.
Definition at line 44 of file array_ref.hh.
|
inline |
Definition at line 69 of file array_ref.hh.
|
inline |
Definition at line 54 of file array_ref.hh.
Referenced by array_ref< T >::rend().
|
inline |
Definition at line 73 of file array_ref.hh.
Referenced by array_ref< T >::remove_prefix(), and array_ref< T >::remove_suffix().
|
inline |
Definition at line 70 of file array_ref.hh.
Referenced by openmsx::AviRecorder::getFrameHeight(), array_ref< T >::operator=(), and openmsx::ZlibInflate::ZlibInflate().
|
inline |
Definition at line 61 of file array_ref.hh.
Referenced by openmsx::CLIOption::getArgument(), openmsx::CommandLineParser::parse(), openmsx::CLIOption::peekArgument(), openmsx::MSXCommandEvent::serialize(), and openmsx::DiskManipulator::unregisterDrive().
|
inline |
Definition at line 55 of file array_ref.hh.
Referenced by array_ref< T >::rbegin().
|
inline |
Definition at line 68 of file array_ref.hh.
Referenced by openmsx::CLIOption::getArgument(), openmsx::CommandLineParser::parse(), and openmsx::CLIOption::peekArgument().
Definition at line 47 of file array_ref.hh.
References array_ref< T >::data(), and array_ref< T >::size().
|
inline |
Definition at line 64 of file array_ref.hh.
|
inline |
Definition at line 89 of file array_ref.hh.
References array_ref< T >::remove_suffix().
|
inline |
Definition at line 90 of file array_ref.hh.
References array_ref< T >::remove_prefix().
Referenced by openmsx::DiskImageCLI::fileTypeHelp(), openmsx::MSXRomCLI::fileTypeHelp(), openmsx::CLIOption::getArgument(), and openmsx::CommandLineParser::parse().
|
inline |
Definition at line 56 of file array_ref.hh.
References array_ref< T >::end().
Definition at line 74 of file array_ref.hh.
References array_ref< T >::clear().
Referenced by array_ref< T >::pop_front().
Definition at line 82 of file array_ref.hh.
References array_ref< T >::clear().
Referenced by array_ref< T >::pop_back().
|
inline |
Definition at line 57 of file array_ref.hh.
References array_ref< T >::begin().
Definition at line 60 of file array_ref.hh.
Referenced by openmsx::CPUCore< openmsx::Z80TYPE >::disasmCommand(), openmsx::RomInfoTopic::execute(), openmsx::MessageCommand::execute(), openmsx::NowindCommand::execute(), openmsx::HDCommand::execute(), openmsx::AfterCommand::execute(), openmsx::CDXCommand::execute(), openmsx::Sha1SumCommand::execute(), openmsx::DiskCommand::execute(), openmsx::ExitCommand::execute(), openmsx::MachineCommand::execute(), openmsx::LoadMachineCmd::execute(), openmsx::TestMachineCommand::execute(), openmsx::LSXCommand::execute(), openmsx::CreateMachineCommand::execute(), openmsx::RemoveExtCmd::execute(), openmsx::DeleteMachineCommand::execute(), openmsx::ActivateMachineCommand::execute(), openmsx::StoreMachineCommand::execute(), openmsx::DeviceInfo::execute(), openmsx::RestoreMachineCommand::execute(), openmsx::ConfigInfo::execute(), openmsx::SoftwareInfoTopic::execute(), openmsx::ExtCmd::execute(), openmsx::CasImage::fillBuffer(), openmsx::MSXMixer::findDevice(), openmsx::UserSettings::findSetting(), openmsx::CassettePlayer::generateChannels(), openmsx::PluggingController::getCurrentTime(), openmsx::AviRecorder::getFrameHeight(), openmsx::DiskChanger::insertDisk(), openmsx::CartridgeSlotManager::isExternalSlot(), openmsx::SettingsManager::loadSettings(), openmsx::HDCommand::needRecord(), openmsx::DiskCommand::needRecord(), array_ref< T >::operator=(), openmsx::OSDGUI::refresh(), openmsx::PluggingController::registerPluggable(), openmsx::Display::removeLayer(), openmsx::HotKey::saveBindings(), openmsx::SettingsConfig::saveSetting(), openmsx::GlobalCommandController::tabCompletion(), openmsx::Debugger::transfer(), openmsx::DiskManipulator::unregisterDrive(), openmsx::InfoCommand::unregisterTopic(), openmsx::ZlibInflate::ZlibInflate(), and openmsx::ReverseManager::~ReverseManager().
|
inline |
Definition at line 92 of file array_ref.hh.
References array_ref< T >::array_ref(), and gl::min().