#include <lodge_list.h>
Inheritance diagram for gslib::static_container::lodge_list< Value >:
Public Types | |
typedef list_link | link |
typedef list_node< Value > | node |
typedef abstruct_list_node_pool< Value > | pool |
typedef boost::call_traits< Value >::param_type | param_type |
Public Member Functions | |
lodge_list (pool &ioPool) | |
lodge_list (const lodge_list &other) | |
~lodge_list () | |
lodge_list & | operator= (const lodge_list &other) |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reference | push_back () |
Value * | allocate (iterator pos=end()) |
ノードは、pos の直前に連結される | |
void | insert (iterator pos, param_type v) |
prev = pos - 1 とすると、元々 prev, pos と接続されていたものが、prev, v, pos の順に接続される。 | |
template<typename It> void | insert (iterator pos, It first, It last) |
prev = pos - 1 とすると、元々 prev, pos と接続されていたものが、prev, v, pos の順に接続される。 | |
void | push_front (param_type v) |
先頭に追加 | |
void | push_back (param_type v) |
末尾に追加 | |
void | erase (iterator pos) |
pos で示される要素を削除 | |
void | erase (iterator first, iterator last) |
区間 [ first, last ) を削除 | |
void | clear () |
クリア(全要素削除) | |
void | pop_front () |
先頭を削除 | |
void | pop_back () |
末尾を削除 | |
void | remove (const Value &value) |
値 value を持つ要素を削除する | |
template<typename Pred> void | remove_if (Pred pred) |
pred( *it ) が true を返すときに it を削除する | |
size_type | size () const |
サイズ取得 | |
bool | empty () const |
空かどうか? | |
reference | front () |
先頭を取得 | |
param_type | front () const |
先頭を取得 | |
reference | back () |
末尾を取得 | |
param_type | back () const |
末尾を取得 | |
Private Member Functions | |
void | init () |
Static Private Member Functions | |
void | destruct (Value &v) |
Private Attributes | |
link | end_ |
pool * | pool_ |
lodge_list 利用中に list_node_pool を破棄してはならない。
http://www.alc.co.jp/ で、 lodge = 【自動-1】 泊まる、宿泊{しゅくはく}する、下宿{げしゅく}する とあったので、命名したが、もっと良い名前があれば、随時募集。
Definition at line 80 of file lodge_list.h.
|
Definition at line 82 of file lodge_list.h. |
|
Definition at line 83 of file lodge_list.h. |
|
Definition at line 87 of file lodge_list.h. |
|
Reimplemented in gslib::static_container::list< Value, MaxSize >, and gslib::static_container::list< std::pair< Key, Value >, MaxSize >. Definition at line 85 of file lodge_list.h. |
|
Definition at line 230 of file lodge_list.h.
|
|
Definition at line 233 of file lodge_list.h.
|
|
Definition at line 237 of file lodge_list.h.
00237 { 00238 clear(); 00239 } |
|
ノードは、pos の直前に連結される
Definition at line 273 of file lodge_list.h. Referenced by gslib::static_container::lodge_list< std::pair< Key, Value > >::insert().
|
|
末尾を取得
Definition at line 393 of file lodge_list.h.
00393 { 00394 return *( --end() ); 00395 } |
|
末尾を取得
Definition at line 389 of file lodge_list.h.
00389 { 00390 return *( --end() ); 00391 } |
|
Definition at line 256 of file lodge_list.h.
00256 { 00257 return const_iterator( end_.next ); 00258 } |
|
|
クリア(全要素削除)
Definition at line 336 of file lodge_list.h. Referenced by gslib::static_container::lodge_list< std::pair< Key, Value > >::operator=(), gslib::static_container::list< std::pair< Key, Value >, MaxSize >::operator=(), and gslib::static_container::lodge_list< std::pair< Key, Value > >::~lodge_list().
|
|
Definition at line 89 of file lodge_list.h. Referenced by gslib::static_container::lodge_list< std::pair< Key, Value > >::erase().
00089 { 00090 static_container::destruct< Value >( v ); 00091 } |
|
空かどうか?
Definition at line 376 of file lodge_list.h.
|
|
Definition at line 259 of file lodge_list.h.
00259 {
00260 return const_iterator( &end_ );
00261 }
|
|
|
区間 [ first, last ) を削除
Definition at line 328 of file lodge_list.h.
00328 { 00329 // 解放 00330 std::for_each( first, last, destruct ); 00331 // node を pool に返す 00332 pool_->deallocate( first.getNode(), last.getNode() ); 00333 } |
|
|
先頭を取得
Definition at line 385 of file lodge_list.h.
00385 { 00386 return *begin(); 00387 } |
|
先頭を取得
Definition at line 381 of file lodge_list.h.
00381 { 00382 return *begin(); 00383 } |
|
Definition at line 224 of file lodge_list.h. Referenced by gslib::static_container::lodge_list< std::pair< Key, Value > >::lodge_list().
|
|
prev = pos - 1 とすると、元々 prev, pos と接続されていたものが、prev, v, pos の順に接続される。
Definition at line 300 of file lodge_list.h.
00300 { 00301 for ( ; first != last; ++first ) { 00302 Value* val = allocate( pos ); 00303 // コンストラクタ呼び出し 00304 new( val ) Value( *first ); 00305 } 00306 } |
|
prev = pos - 1 とすると、元々 prev, pos と接続されていたものが、prev, v, pos の順に接続される。
Definition at line 289 of file lodge_list.h. Referenced by gslib::static_container::list< std::pair< Key, Value >, MaxSize >::list(), gslib::static_container::lodge_list< std::pair< Key, Value > >::lodge_list(), gslib::static_container::lodge_list< std::pair< Key, Value > >::operator=(), gslib::static_container::list< std::pair< Key, Value >, MaxSize >::operator=(), gslib::static_container::lodge_list< std::pair< Key, Value > >::push_back(), and gslib::static_container::lodge_list< std::pair< Key, Value > >::push_front().
00289 { 00290 Value* val = allocate( pos ); 00291 // コンストラクタ呼び出し 00292 new( val ) Value( v ); 00293 } |
|
Definition at line 241 of file lodge_list.h.
|
|
末尾を削除
Definition at line 346 of file lodge_list.h.
|
|
先頭を削除
Definition at line 341 of file lodge_list.h.
|
|
末尾に追加
Definition at line 314 of file lodge_list.h.
|
|
Definition at line 263 of file lodge_list.h.
|
|
先頭に追加
Definition at line 309 of file lodge_list.h.
|
|
値 value を持つ要素を削除する
Definition at line 351 of file lodge_list.h.
00351 { 00352 remove_if( std::bind2nd( std::equal_to< value_type >(), value ) ); 00353 } |
|
pred( *it ) が true を返すときに it を削除する
Definition at line 360 of file lodge_list.h. Referenced by gslib::static_container::lodge_list< std::pair< Key, Value > >::remove().
|
|
サイズ取得
Definition at line 371 of file lodge_list.h.
|
|
Definition at line 221 of file lodge_list.h. |
|
Definition at line 222 of file lodge_list.h. Referenced by gslib::static_container::lodge_list< std::pair< Key, Value > >::operator=(). |