UdonLibrary 1.0.0
機械システム研究部 C++ ライブラリ
読み取り中…
検索中…
一致する文字列を見つけられません
Udon::ArrayView< T > クラステンプレート

配列参照クラス [詳解]

#include <Udon/Types/ArrayView.hpp>

公開型

using size_type = size_t
 
using value_type = T
 
using reference = T&
 
using const_reference = const T&
 
using pointer = T*
 
using const_pointer = const T*
 
using iterator = T*
 
using const_iterator = const T*
 
using reverse_iterator = std::reverse_iterator<iterator>
 
using const_reverse_iterator = std::reverse_iterator<const_iterator>
 

公開メンバ関数

 ArrayView ()
 
template<size_t N>
 ArrayView (value_type(&array)[N])
 
 ArrayView (pointer m_data, const size_type count)
 
template<typename InputIterator , typename = typename std::enable_if<std::is_convertible<typename std::iterator_traits<InputIterator>::iterator_category, std::input_iterator_tag>::value>::type>
 ArrayView (InputIterator first, InputIterator last)
 
template<typename Other >
 ArrayView (const ArrayView< Other > &other)
 
template<typename Container , typename = decltype(std::declval<Container>().data(), std::declval<Container>().size())>
 ArrayView (Container &&container)
 
 operator bool () const noexcept
 
constexpr size_type size () const
 
pointer data ()
 
const_pointer data () const
 
reference operator[] (const size_type index)
 
const_reference operator[] (const size_type index) const
 
reference at (const size_type index)
 
const_reference at (const size_type index) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
bool empty () const
 
void clear ()
 
void fill (const value_type &value)
 
ArrayView removeFrontView (size_type count) const
 先頭から指定要素削除したビューを作成する。
 
ArrayView removeBackView (size_type count)
 末尾から指定要素削除したビューを作成する。
 
ArrayView removeBackView (size_type count) const
 
ArrayView subView (size_type beginIndex, size_type endIndex) const
 指定された範囲からビューを作成する。
 
ArrayView subView (size_type beginIndex) const
 指定された範囲からビューを作成する。
 
ArrayView subViewUntil (const value_type &terminate) const
 特定の値まで検索し、そこまでの範囲の一つ手前までをビューとする。
 
bool startsWith (const ArrayView &rhs) const
 自身が指定のビューから始まるかどうか
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_reverse_iterator rbegin () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rend () const
 
reverse_iterator rend ()
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 

フレンド

bool operator== (const ArrayView &lhs, const ArrayView &rhs)
 
bool operator!= (const ArrayView &lhs, const ArrayView &rhs)
 
std::ostream & operator<< (std::ostream &ostm, const ArrayView &rhs)
 

詳解

template<typename T>
class Udon::ArrayView< T >

配列参照クラス

型定義メンバ詳解

◆ const_iterator

template<typename T >
using Udon::ArrayView< T >::const_iterator = const T*

◆ const_pointer

template<typename T >
using Udon::ArrayView< T >::const_pointer = const T*

◆ const_reference

template<typename T >
using Udon::ArrayView< T >::const_reference = const T&

◆ const_reverse_iterator

template<typename T >
using Udon::ArrayView< T >::const_reverse_iterator = std::reverse_iterator<const_iterator>

◆ iterator

template<typename T >
using Udon::ArrayView< T >::iterator = T*

◆ pointer

template<typename T >
using Udon::ArrayView< T >::pointer = T*

◆ reference

template<typename T >
using Udon::ArrayView< T >::reference = T&

◆ reverse_iterator

template<typename T >
using Udon::ArrayView< T >::reverse_iterator = std::reverse_iterator<iterator>

◆ size_type

template<typename T >
using Udon::ArrayView< T >::size_type = size_t

◆ value_type

template<typename T >
using Udon::ArrayView< T >::value_type = T

構築子と解体子

◆ ArrayView() [1/6]

template<typename T >
Udon::ArrayView< T >::ArrayView ( )
inline

◆ ArrayView() [2/6]

template<typename T >
template<size_t N>
Udon::ArrayView< T >::ArrayView ( value_type(&) array[N])
inline

◆ ArrayView() [3/6]

template<typename T >
Udon::ArrayView< T >::ArrayView ( pointer m_data,
const size_type count )
inline

◆ ArrayView() [4/6]

template<typename T >
template<typename InputIterator , typename = typename std::enable_if<std::is_convertible<typename std::iterator_traits<InputIterator>::iterator_category, std::input_iterator_tag>::value>::type>
Udon::ArrayView< T >::ArrayView ( InputIterator first,
InputIterator last )
inline

◆ ArrayView() [5/6]

template<typename T >
template<typename Other >
Udon::ArrayView< T >::ArrayView ( const ArrayView< Other > & other)
inline

◆ ArrayView() [6/6]

template<typename T >
template<typename Container , typename = decltype(std::declval<Container>().data(), std::declval<Container>().size())>
Udon::ArrayView< T >::ArrayView ( Container && container)
inline

関数詳解

◆ at() [1/2]

template<typename T >
reference Udon::ArrayView< T >::at ( const size_type index)
inline

◆ at() [2/2]

template<typename T >
const_reference Udon::ArrayView< T >::at ( const size_type index) const
inline

◆ back() [1/2]

template<typename T >
reference Udon::ArrayView< T >::back ( )
inline

◆ back() [2/2]

template<typename T >
const_reference Udon::ArrayView< T >::back ( ) const
inline

◆ begin() [1/2]

template<typename T >
iterator Udon::ArrayView< T >::begin ( )
inline

◆ begin() [2/2]

template<typename T >
const_iterator Udon::ArrayView< T >::begin ( ) const
inline

◆ cbegin()

template<typename T >
const_iterator Udon::ArrayView< T >::cbegin ( ) const
inline

◆ cend()

template<typename T >
const_iterator Udon::ArrayView< T >::cend ( ) const
inline

◆ clear()

template<typename T >
void Udon::ArrayView< T >::clear ( )
inline

◆ crbegin()

template<typename T >
const_reverse_iterator Udon::ArrayView< T >::crbegin ( ) const
inline

◆ crend()

template<typename T >
const_reverse_iterator Udon::ArrayView< T >::crend ( ) const
inline

◆ data() [1/2]

template<typename T >
pointer Udon::ArrayView< T >::data ( )
inline

◆ data() [2/2]

template<typename T >
const_pointer Udon::ArrayView< T >::data ( ) const
inline

◆ empty()

template<typename T >
bool Udon::ArrayView< T >::empty ( ) const
inline

◆ end() [1/2]

template<typename T >
iterator Udon::ArrayView< T >::end ( )
inline

◆ end() [2/2]

template<typename T >
const_iterator Udon::ArrayView< T >::end ( ) const
inline

◆ fill()

template<typename T >
void Udon::ArrayView< T >::fill ( const value_type & value)
inline

◆ front() [1/2]

template<typename T >
reference Udon::ArrayView< T >::front ( )
inline

◆ front() [2/2]

template<typename T >
const_reference Udon::ArrayView< T >::front ( ) const
inline

◆ operator bool()

template<typename T >
Udon::ArrayView< T >::operator bool ( ) const
inlineexplicitnoexcept

◆ operator[]() [1/2]

template<typename T >
reference Udon::ArrayView< T >::operator[] ( const size_type index)
inline

◆ operator[]() [2/2]

template<typename T >
const_reference Udon::ArrayView< T >::operator[] ( const size_type index) const
inline

◆ rbegin() [1/2]

template<typename T >
reverse_iterator Udon::ArrayView< T >::rbegin ( )
inline

◆ rbegin() [2/2]

template<typename T >
const_reverse_iterator Udon::ArrayView< T >::rbegin ( ) const
inline

◆ removeBackView() [1/2]

template<typename T >
ArrayView Udon::ArrayView< T >::removeBackView ( size_type count)
inline

末尾から指定要素削除したビューを作成する。

引数
count削除する要素数
戻り値
作成したビュー

◆ removeBackView() [2/2]

template<typename T >
ArrayView Udon::ArrayView< T >::removeBackView ( size_type count) const
inline

◆ removeFrontView()

template<typename T >
ArrayView Udon::ArrayView< T >::removeFrontView ( size_type count) const
inline

先頭から指定要素削除したビューを作成する。

引数
count削除する要素数
戻り値

◆ rend() [1/2]

template<typename T >
reverse_iterator Udon::ArrayView< T >::rend ( )
inline

◆ rend() [2/2]

template<typename T >
const_reverse_iterator Udon::ArrayView< T >::rend ( ) const
inline

◆ size()

template<typename T >
size_type Udon::ArrayView< T >::size ( ) const
inlineconstexpr

◆ startsWith()

template<typename T >
bool Udon::ArrayView< T >::startsWith ( const ArrayView< T > & rhs) const
inline

自身が指定のビューから始まるかどうか

覚え書き
[0, 1, 2, 3, 4].startsWith([0, 1, 2]) == true [4, 3, 2, 1, 0].startsWith([0, 1, 2]) == false
引数
rhs
戻り値

◆ subView() [1/2]

template<typename T >
ArrayView Udon::ArrayView< T >::subView ( size_type beginIndex) const
inline

指定された範囲からビューを作成する。

覚え書き
終端は現在のビューの終端
引数
beginIndex開始位置
戻り値

◆ subView() [2/2]

template<typename T >
ArrayView Udon::ArrayView< T >::subView ( size_type beginIndex,
size_type endIndex ) const
inline

指定された範囲からビューを作成する。

引数
beginIndex開始位置
endIndex終端位置
戻り値

◆ subViewUntil()

template<typename T >
ArrayView Udon::ArrayView< T >::subViewUntil ( const value_type & terminate) const
inline

特定の値まで検索し、そこまでの範囲の一つ手前までをビューとする。

引数
terminate終端の値
戻り値

フレンドと関連関数の詳解

◆ operator!=

template<typename T >
bool operator!= ( const ArrayView< T > & lhs,
const ArrayView< T > & rhs )
friend

◆ operator<<

template<typename T >
std::ostream & operator<< ( std::ostream & ostm,
const ArrayView< T > & rhs )
friend

◆ operator==

template<typename T >
bool operator== ( const ArrayView< T > & lhs,
const ArrayView< T > & rhs )
friend

このクラス詳解は次のファイルから抽出されました: