リスト More...
#include <list.hpp>
Public Member Functions | |
List (Node< Element, Size > *const data, const Size &dataSize) | |
内部データを扱う領域とそのサイズを指定してリストを初期化 More... | |
List (const List &)=delete | |
List & | operator= (const List &)=delete |
OperationResult | append (const Element &element) |
リストの末尾にデータを追加 More... | |
OperationResult | insert (const Size &index, const Element &element) |
リスト内の任意の位置にデータを追加 More... | |
OperationResult | pop (Element *const element) |
リスト末尾のデータを削除し、取り出す More... | |
OperationResult | remove (const Size &index, Element *const element) |
リスト内の任意の位置にあるデータを削除し、取り出す More... | |
Element * | get (const Size &index) |
リスト内の要素を参照する More... | |
Node< Element > * | head () const |
リスト先頭へのポインタを取得 More... | |
Node< Element > * | tail () const |
リスト末尾へのポインタを取得 More... | |
Size | capacity () const |
リストの全体長を返す More... | |
Size | amount () const |
現在リスト内にあるデータ数を返す More... | |
リスト
Element | 扱う要素の型 |
collection2::List< Element, Size >::List | ( | Node< Element, Size > *const | data, |
const Size & | dataSize | ||
) |
内部データを扱う領域とそのサイズを指定してリストを初期化
data | 内部データ保管用領域 |
dataSize | 領域サイズ |
OperationResult collection2::List< Element, Size >::append | ( | const Element & | element | ) |
リストの末尾にデータを追加
element | 追加するデータ |
OperationResult collection2::List< Element, Size >::insert | ( | const Size & | index, |
const Element & | element | ||
) |
リスト内の任意の位置にデータを追加
index | 追加位置 |
element | 追加するデータ |
OperationResult collection2::List< Element, Size >::pop | ( | Element *const | element | ) |
リスト末尾のデータを削除し、取り出す
element | 削除したデータの格納先 |
OperationResult collection2::List< Element, Size >::remove | ( | const Size & | index, |
Element *const | element | ||
) |
リスト内の任意の位置にあるデータを削除し、取り出す
index | 削除位置 |
element | 削除したデータの格納先 |
Element * collection2::List< Element, Size >::get | ( | const Size & | index | ) |
リスト内の要素を参照する
index | 参照位置 |
|
inline |
リスト先頭へのポインタを取得
|
inline |
リスト末尾へのポインタを取得
|
inline |
リストの全体長を返す
|
inline |
現在リスト内にあるデータ数を返す