81 return *(
_node->_value);
139 VOID APIENTRY
Add (T& item)
145 _node->_prev = newNode;
146 _node->_next = newNode;
152 while(current != NULL)
156 if (next == NULL || ::memcmp (newNode->
_byMD5, next->
_byMD5, 32) < 0)
158 if (next) next->
_prev = newNode;
159 current->
_next = newNode;
160 if (current) newNode->
_prev = current;
161 if (next) newNode->
_next = next;
165 if (current->
_next == NULL)
break;
167 current = current->
_next;
180 for (;current != NULL;)
182 if (*(current->
_value) == item)
186 current = current->
_next;
193 if (before != NULL && before->
_next != NULL) before->
_next = after;
194 if (after != NULL && after->
_prev != NULL) after->
_prev = before;
206 for (INT i = 0; i < index; i++)
208 if (current ==
nullptr)
212 current = current->
_next;
221 T* APIENTRY
Get (SIZE_T index)
const
225 for (INT i = 0; i < index; i++)
227 if (current ==
nullptr)
231 current = current->
_next;
234 return current !=
nullptr ? current->
_value :
nullptr;
251 for (
auto& itr : base)
307 center = (
_size + 1) / 2;
static BOOL APIENTRY CreateMD5(LPBYTE lpbyData, DWORD dwSize, LPBYTE lpbyMD5)
データからMD5を計算
T *APIENTRY operator[](SIZE_T index) const
Map<T>を配列操作で取得
T *APIENTRY Get(SIZE_T index) const
指定したインデックスの値を取得
MapNode< T > * GetNode(SIZE_T index)
MapIterator< T > APIENTRY end() const
for(auto n : list){}を使用できるようにするインターフェース
VOID APIENTRY Clear()
領域の開放
VOID APIENTRY Remove(T &item)
Map<T>から値を削除
VOID APIENTRY Add(T &item)
Map<T>へ値を追加
VOID APIENTRY operator=(const Map< T > &base)
同じ型のMap<T>をコピー
SIZE_T APIENTRY Size() const
サイズを取得
friend MapIterator< T >
Iteratorからのアクセス権を解放
MapIterator< T > APIENTRY begin() const
for(auto n : map){}を使用できるようにするインターフェース
void Balance(int left, int center, int right, MapNode< T > balance)
bool APIENTRY operator!=(const MapIterator< T > &comp)
ノード末尾確認用オペレータ
MapIterator< T > &APIENTRY operator++()
ノード移動用オペレータ
T &APIENTRY operator*()
データアクセス用オペレータ
MapNode< T > * _prev
先頭を保持するノード
MapNode< T > * _next
末尾を保持するノード