#include <list_node_pool.h>
static_container::abstruct_list_node_pool< Value >に対する継承グラフ


Public 型 | |
| typedef list_link | link |
| typedef list_node< Value > | node |
Public メソッド | |
| virtual size_type | size () const=0 |
| node * | allocate () |
| メモリ領域の貸与のみ。value のコンストラクタ呼び出しは、ユーザーの責任。 | |
| void | deallocate (link *first, link *last) |
| デストラクタ呼び出しは行わない | |
| void | deallocate (link *n) |
| デストラクタ呼び出しは行わない | |
| bool | full () const |
| size_type | rest () const |
| 空きノード数取得 | |
Protected メソッド | |
| abstruct_list_node_pool () | |
| virtual node * | getTop ()=0 |
| void | init () |
Private 変数 | |
| link | free_ |
list_node_pool.h の 15 行で定義されています。
|
|||||
|
list_node_pool.h の 17 行で定義されています。 参照元 static_container::abstruct_list_node_pool< Value >::deallocate(), と static_container::abstruct_list_node_pool< Value >::rest(). |
|
|||||
|
list_node_pool.h の 18 行で定義されています。 参照元 static_container::abstruct_list_node_pool< Value >::allocate(), と static_container::abstruct_list_node_pool< Value >::init(). |
|
|||||||||
|
list_node_pool.h の 24 行で定義されています。
00024 {
00025 }
|
|
|||||||||
|
メモリ領域の貸与のみ。value のコンストラクタ呼び出しは、ユーザーの責任。
list_node_pool.h の 44 行で定義されています。 参照先 static_container::abstruct_list_node_pool< Value >::free_, static_container::list_link::isolate(), static_container::list_link::next, と static_container::abstruct_list_node_pool< Value >::node.
|
|
||||||||||
|
デストラクタ呼び出しは行わない
list_node_pool.h の 79 行で定義されています。 参照先 static_container::abstruct_list_node_pool< Value >::deallocate(), static_container::abstruct_list_node_pool< Value >::link, と static_container::list_link::next.
00079 {
00080 deallocate( n, n->next );
00081 }
|
|
||||||||||||||||
|
デストラクタ呼び出しは行わない
list_node_pool.h の 58 行で定義されています。 参照先 static_container::abstruct_list_node_pool< Value >::free_, static_container::abstruct_list_node_pool< Value >::link, static_container::list_link::next, と static_container::list_link::prev. 参照元 static_container::abstruct_list_node_pool< Value >::deallocate().
00058 {
00059 if ( first == last ) {
00060 return;
00061 }
00062
00063 // 「first の直前」と「last」を接続
00064 first->prev->next = last;
00065 link* lastPrev = last->prev;
00066 last->prev = first->prev;
00067
00068 // [ first, lastPrev ] を free_ の終端に接続
00069 first->prev = free_.prev;
00070 free_.prev->next = first;
00071 free_.prev = lastPrev;
00072 lastPrev->next = &free_;
00073 }
|
|
|||||||||
|
list_node_pool.h の 88 行で定義されています。 参照先 static_container::abstruct_list_node_pool< Value >::free_, と static_container::list_link::next.
|
|
|||||||||
|
static_container::list_node_pool< Value, Size >を実装しています. 参照元 static_container::abstruct_list_node_pool< Value >::init(). |
|
|||||||||
|
list_node_pool.h の 28 行で定義されています。 参照先 static_container::abstruct_list_node_pool< Value >::free_, static_container::abstruct_list_node_pool< Value >::getTop(), static_container::list_link::next, static_container::abstruct_list_node_pool< Value >::node, static_container::list_link::prev, static_container::abstruct_list_node_pool< Value >::size(), と static_container::size_type. 参照元 static_container::list_node_pool< Value, Size >::list_node_pool().
00028 {
00029 // すべての要素を free_ に追加
00030 node* top = getTop();
00031 free_.next = top;
00032 free_.prev = top + size() - 1;
00033 top->prev = &free_;
00034 free_.prev->next = &free_;
00035 for ( size_type i = 1; i < size(); ++i ) {
00036 top[ i - 1 ].next = &top[ i ];
00037 top[ i ].prev = &top[ i - 1 ];
00038 }
00039 }
|
|
|||||||||
|
|||||||||
|
static_container::list_node_pool< Value, Size >を実装しています. 参照元 static_container::abstruct_list_node_pool< Value >::init(). |
|
|||||
1.3.6