スタック More...
#include <stack.hpp>
Public Member Functions | |
Stack (Element *const data, const Size &dataSize) | |
内部データを扱う領域とそのサイズを指定してスタックを初期化 More... | |
Stack (const Stack &)=delete | |
Stack & | operator= (const Stack &)=delete |
OperationResult | push (const Element &data) |
スタックにデータを追加 More... | |
OperationResult | pop (Element *const data) |
スタックからデータを取り出し More... | |
Size | capacity () const |
スタックの全体長を返す More... | |
Size | amount () const |
現在スタック内にあるデータ数を返す More... | |
bool | hasSpace () const |
スタックに値を追加できるか More... | |
bool | isEmpty () const |
スタックが空かどうか More... | |
スタック
Element | |
Size |
collection2::Stack< Element, Size >::Stack | ( | Element *const | data, |
const Size & | dataSize | ||
) |
内部データを扱う領域とそのサイズを指定してスタックを初期化
data | 内部データ保管用領域 |
dataSize | 領域サイズ |
OperationResult collection2::Stack< Element, Size >::push | ( | const Element & | data | ) |
スタックにデータを追加
data | 追加するデータ |
OperationResult collection2::Stack< Element, Size >::pop | ( | Element *const | data | ) |
スタックからデータを取り出し
data | 取り出したデータの格納先 |
|
inline |
スタックの全体長を返す
|
inline |
現在スタック内にあるデータ数を返す
|
inline |
スタックに値を追加できるか
|
inline |
スタックが空かどうか