Internal implementation class. Leaf node of SparseAList{T}.
This node consists of a certain number of virtual slots (_totalCount) and a certain number of real slots (_list.Count). Node splitting/joining behavior is based entirely on the number of real slots. There can be any number of empty spaces anywhere in the list. If there are empty spaces at the beginning, _list[0].Offset > 0
; if there are empty spaces at the end, _totalCount > _list.Last.Offset + 1
. _list.Count == 0
only if the entire list consists of empty space and there is only a single node.
|
| SparseAListLeaf (ushort maxNodeSize) |
|
| SparseAListLeaf (SparseAListLeaf< T > original) |
|
override T | GetLastItem () |
| Gets the last item in the last leaf node (needed by B+ trees, but is also called by AListBase{K,T}.Last). More...
|
|
override void | SetAt (uint index, T item, IAListTreeObserver< int, T > tob) |
|
override bool | RemoveAt (uint index, uint count, IAListTreeObserver< int, T > tob) |
|
override void | Freeze () |
|
override AListNode< int, T > | DetachedClone () |
| Creates an unfrozen shallow duplicate copy of this node. The child nodes (if this is an inner node) are frozen so that they will require duplication if they are to be modified. The name "DetachedClone" is intended to emphasize that the AListNodeObserver (if any) is not notified, and the clone is effectively independent of the list that it came from. More...
|
|
override AListNode< int, T > | CopySection (uint index, uint count, AListBase< int, T > list) |
|
override uint | GetImmutableCount (bool excludeSparse) |
| Diagnostic method. See AListBase{K,T}.GetImmutableCount(). More...
|
|
override AListNode< int, T > | Insert (uint index, T item, out AListNode< int, T > splitRight, IAListTreeObserver< int, T > tob) |
|
override AListNode< int, T > | InsertRange (uint index, IListSource< T > source, ref int sourceIndex, out AListNode< int, T > splitRight, IAListTreeObserver< int, T > tob) |
|
override uint | GetRealItemCount () |
| For sparse lists: counts the number of non-sparse items. More...
|
|
virtual AListNode< K, T > | Insert (uint index, T item, out AListNode< K, T > splitRight, IAListTreeObserver< K, T > tob) |
| Inserts an item at the specified index. This method can only be called for ALists, since other tree types don't allow insertion at a specific index. More...
|
|
virtual AListNode< K, T > | InsertRange (uint index, IListSource< T > source, ref int sourceIndex, out AListNode< K, T > splitRight, IAListTreeObserver< K, T > tob) |
| Inserts a list of items at the specified index. This method may not insert all items at once, so there is a sourceIndex parameter which points to the next item to be inserted. When sourceIndex reaches source.Count, the insertion is complete. More...
|
|
abstract void | SetAt (uint index, T item, IAListTreeObserver< K, T > tob) |
| Sets an item at the specified sub-index. More...
|
|
abstract bool | RemoveAt (uint index, uint count, IAListTreeObserver< K, T > tob) |
| Removes an item at the specified index. More...
|
|
abstract AListNode< K, T > | CopySection (uint index, uint count, AListBase< K, T > list) |
| Extracts and returns, as fast as possible, a subrange of the list that this node represents. More...
|
|
|
static bool | AutoClone (ref AListNode< K, T > node, AListInnerBase< K, T > parent, IAListTreeObserver< K, T > tob) |
| Checks whether 'node' is frozen and if so, replaces it with an unfrozen copy. More...
|
|
IAListTreeObserver< K, T > | GetObserver (AListBase< K, T > tree) |
| Allows derived classes of AListNode to access AListBase._observer. More...
|
|
bool | HasListChanging (AListBase< K, T > tree) |
| Allows derived classes of AListNode to fire the AListBase.ListChanging event. More...
|
|
void | CallListChanging (AListBase< K, T > tree, ListChangeInfo< T > listChangeInfo) |
| Allows derived classes of AListNode to fire the AListBase.ListChanging event properly. More...
|
|
static void | Verify (bool condition) |
| Same as Assert(), except that the condition expression can have side-effects because it is evaluated even in Release builds. More...
|
|