Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Properties | Public Member Functions | Protected Member Functions | Protected fields | List of all members
Loyc.Collections.AListBase< K, T >.ObserverMgr Class Reference

A multiplexer that is only created for ALists that have two or more attached intances of IAListTreeObserver{K,T}. More...


Source file:
Inheritance diagram for Loyc.Collections.AListBase< K, T >.ObserverMgr:
Loyc.Collections.AListBase< K, T > Loyc.Collections.IListSource< out T > Loyc.Collections.INotifyListChanging< T > Loyc.Collections.IListSource< out T > Loyc.Collections.INotifyListChanging< T >

Remarks

A multiplexer that is only created for ALists that have two or more attached intances of IAListTreeObserver{K,T}.

Properties

int ObserverCount [get]
 
- Properties inherited from Loyc.Collections.AListBase< K, T >
virtual ListChangingHandler< T > ListChanging
 Event for learning about changes in progress on a list. More...
 
byte TreeHeight [get]
 
int Count [get]
 
bool IsEmpty [get]
 
AListReverseView< K, T > ReverseView [get]
 
this[int index] [get]
 
bool IsFrozen [get]
 
First [get]
 
Last [get]
 
int ObserverCount [get]
 Returns the number of tree observers attached to this list. More...
 

Public Member Functions

 ObserverMgr (AListBase< K, T > list, AListNode< K, T > root, IAListTreeObserver< K, T > existingObserver)
 
void Attach (AListBase< K, T > list, Action< bool > populate)
 
void Detach ()
 
void RootChanged (AListNode< K, T > newRoot, bool clear)
 
void ItemAdded (T item, AListLeaf< K, T > parent)
 
void ItemRemoved (T item, AListLeaf< K, T > parent)
 
void NodeAdded (AListNode< K, T > child, AListInnerBase< K, T > parent)
 
void NodeRemoved (AListNode< K, T > child, AListInnerBase< K, T > parent)
 
void RemoveAll (AListNode< K, T > node)
 
void AddAll (AListNode< K, T > node)
 
void CheckPoint ()
 
- Public Member Functions inherited from Loyc.Collections.AListBase< K, T >
void RemoveAt (int index)
 
void RemoveRange (int index, int amount)
 
int RemoveAll (Predicate< T > match)
 Removes all the elements that match the conditions defined by the specified predicate. More...
 
virtual void Clear ()
 
IEnumerable< int > IndexesOf (T item)
 Returns a sequence of integers that represent the locations where a given item appears in the list. More...
 
virtual IEnumerable< int > IndexesOf (T item, int minIndex, int maxIndex)
 
int LinearScanFor (T item, int startIndex, EqualityComparer< T > comparer)
 Scans the list starting at startIndex and going upward, and returns the index of an item that matches the first argument. More...
 
void CopyTo (T[] array, int arrayIndex)
 
Enumerator GetEnumerator ()
 
Enumerator GetEnumerator (int startIndex)
 
Enumerator GetEnumerator (int start, int subcount)
 
Enumerator GetEnumerator (int start, int subcount, bool startAtEnd)
 
TryGet (int index, out bool fail)
 Gets the item at the specified index, and does not throw an exception on failure. More...
 
virtual void Freeze ()
 Prevents further changes to the list. More...
 
Slice_< T > Slice (int start, int length)
 Returns a sub-range of this list. More...
 
int GetImmutableCount ()
 Diagnostic method. Returns the number of elements of the list that are located in immutable nodes, which will be copied if modified. Used by the test suite. More...
 

Protected Member Functions

virtual void IllegalException (Exception e)
 Called when an observer throws something and the exception is being swallowed (because IAListTreeObserver is not allowed to throw). More...
 
- Protected Member Functions inherited from Loyc.Collections.AListBase< K, T >
 AListBase (int maxLeafSize)
 
 AListBase (int maxLeafSize, int maxInnerSize)
 
 AListBase (AListBase< K, T > items, bool keepListChangingHandlers)
 Cloning constructor. Does not duplicate the observer (IAListTreeObserver{K,T}), if any, because it may not be cloneable. More...
 
 AListBase (AListBase< K, T > original, AListNode< K, T > section)
 This is the constructor that CopySection(), which can be defined by derived classes, should call to create a sublist of a list. Used in conjunction with CopySectionHelper(). More...
 
abstract AListNode< K, T > NewRootLeaf ()
 
abstract AListInnerBase< K, T > SplitRoot (AListNode< K, T > left, AListNode< K, T > right)
 
virtual Enumerator NewEnumerator (uint start, uint firstIndex, uint lastIndex)
 
void CheckPoint ()
 
void AutoThrow ()
 
void AutoCreateOrCloneRoot ()
 
void AutoSplit (AListNode< K, T > splitLeft, AListNode< K, T > splitRight)
 
void HandleChangedOrUndersizedRoot (AListNode< K, T > result)
 
virtual void ClearInternal (bool forceClear)
 Clears the tree. More...
 
AListNode< K, T > CopySectionHelper (int start, int subcount)
 Together with the AListBase{K,T}.AListBase(AListBase{K,T},AListNode{K,T}) constructor, this method helps implement the CopySection() method in derived classes, by cloning a section of the tree. More...
 
AListNode< K, T > CopySectionHelper (uint start, uint subcount)
 
void SwapHelper (AListBase< K, T > other, bool swapObservers)
 Swaps two ALists. More...
 

Protected fields

AListBase< K, T > _list
 
AListNode< K, T > _root
 
InternalList
< IAListTreeObserver< K, T > > 
_observers = InternalList<IAListTreeObserver<K, T>>.Empty
 
- Protected fields inherited from Loyc.Collections.AListBase< K, T >
uint _count
 
ushort _version
 
ushort _maxLeafSize
 
byte _maxInnerSize
 
byte _treeHeight
 
byte _freezeMode = NotFrozen
 
const byte NotFrozen = 0
 
const byte Frozen = 1
 
const byte FrozenForListChanging = 2
 
const byte FrozenForConcurrency = 3
 

Additional Inherited Members

- Events inherited from Loyc.Collections.INotifyListChanging< T >
ListChangingHandler< T > ListChanging
 Occurs when the collection associated with this interface is about to change. More...
 

Member Function Documentation

virtual void Loyc.Collections.AListBase< K, T >.ObserverMgr.IllegalException ( Exception  e)
inlineprotectedvirtual

Called when an observer throws something and the exception is being swallowed (because IAListTreeObserver is not allowed to throw).

Parameters
eAn exception that was caught.