C5  2.4
The C5 Generic Collection Library for C# and CLI is a comprehensive collection library supporting lists, sets, bags, dictionaries, priority queues, (FIFO) queues, and (LIFO) stacks. C5 runs on .NET 3.5+, Silverlight 5, Windows Phone 8, Xamarin.iOS, Xamarin.Android, and Mono.
C5.GuardedQueue< T > Class Template Reference

A read-only wrapper for a generic indexable queue (allows indexing). More...

Inheritance diagram for C5.GuardedQueue< T >:
C5.GuardedDirectedCollectionValue< T > C5.IQueue< T > C5.GuardedCollectionValue< T > C5.IDirectedCollectionValue< T > C5.IDirectedCollectionValue< T > C5.GuardedEnumerable< T > C5.ICollectionValue< T > C5.ICollectionValue< T > C5.IDirectedEnumerable< T > C5.ICollectionValue< T > C5.IDirectedEnumerable< T > C5.IShowable C5.IShowable C5.IShowable

Public Member Functions

 GuardedQueue (IQueue< T > queue)
 Wrap a queue in a read-only wrapper More...
 
void Enqueue (T item)
 
Dequeue ()
 
- Public Member Functions inherited from C5.GuardedDirectedCollectionValue< T >
 GuardedDirectedCollectionValue (IDirectedCollectionValue< T > directedcollection)
 Wrap a directed collection in a read-only wrapper More...
 
virtual IDirectedCollectionValue< T > Backwards ()
 Get a collection that enumerates the wrapped collection in the opposite direction More...
 
virtual bool FindLast (Func< T, bool > predicate, out T item)
 
- Public Member Functions inherited from C5.GuardedCollectionValue< T >
 GuardedCollectionValue (ICollectionValue< T > collectionvalue)
 Wrap a ICollectionValue<T> in a read-only wrapper More...
 
virtual void CopyTo (T[] a, int i)
 Copy the items of the wrapped collection to an array More...
 
virtual T[] ToArray ()
 Create an array from the items of the wrapped collection More...
 
virtual void Apply (Action< T > a)
 Apply a delegate to all items of the wrapped enumerable. More...
 
virtual bool Exists (Func< T, bool > filter)
 Check if there exists an item that satisfies a specific predicate in the wrapped enumerable. More...
 
virtual bool Find (Func< T, bool > filter, out T item)
 
virtual bool All (Func< T, bool > filter)
 Check if all items in the wrapped enumerable satisfies a specific predicate. More...
 
virtual SCG.IEnumerable< T > Filter (Func< T, bool > filter)
 Create an enumerable, enumerating the items of this collection that satisfies a certain condition. More...
 
virtual T Choose ()
 Choose some item of this collection. More...
 
bool Show (System.Text.StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
 
string ToString (string format, IFormatProvider formatProvider)
 
- Public Member Functions inherited from C5.GuardedEnumerable< T >
 GuardedEnumerable (SCG.IEnumerable< T > enumerable)
 Wrap an enumerable in a read-only wrapper More...
 
SCG.IEnumerator< T > GetEnumerator ()
 Get an enumerator from the wrapped enumerable More...
 
- Public Member Functions inherited from C5.IShowable
bool Show (StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
 Format More...
 

Properties

bool AllowsDuplicates [get]
 
this[int i] [get]
 Index into the wrapped queue More...
 
- Properties inherited from C5.GuardedDirectedCollectionValue< T >
EnumerationDirection Direction [get]
 
- Properties inherited from C5.GuardedCollectionValue< T >
virtual EventTypeEnum ListenableEvents [get]
 The ListenableEvents value of the wrapped collection More...
 
virtual EventTypeEnum ActiveEvents [get]
 The ActiveEvents value of the wrapped collection More...
 
CollectionChangedHandler< T > CollectionChanged
 The change event. Will be raised for every change operation on the collection. More...
 
CollectionClearedHandler< T > CollectionCleared
 The change event. Will be raised for every change operation on the collection. More...
 
ItemsAddedHandler< T > ItemsAdded
 The item added event. Will be raised for every individual addition to the collection. More...
 
ItemInsertedHandler< T > ItemInserted
 The item added event. Will be raised for every individual addition to the collection. More...
 
ItemsRemovedHandler< T > ItemsRemoved
 The item removed event. Will be raised for every individual removal from the collection. More...
 
ItemRemovedAtHandler< T > ItemRemovedAt
 The item removed event. Will be raised for every individual removal from the collection. More...
 
virtual bool IsEmpty [get]
 Get the size of the wrapped collection More...
 
virtual int Count [get]
 Get the size of the wrapped collection More...
 
virtual Speed CountSpeed [get]
 The value is symbolic indicating the type of asymptotic complexity in terms of the size of this collection (worst-case or amortized as relevant). More...
 
- Properties inherited from C5.ICollectionValue< T >
EventTypeEnum ListenableEvents [get]
 A flag bitmap of the events subscribable to by this collection. More...
 
EventTypeEnum ActiveEvents [get]
 A flag bitmap of the events currently subscribed to by this collection. More...
 
bool IsEmpty [get]
 
int Count [get]
 
Speed CountSpeed [get]
 The value is symbolic indicating the type of asymptotic complexity in terms of the size of this collection (worst-case or amortized as relevant). More...
 
- Properties inherited from C5.IDirectedEnumerable< T >
EnumerationDirection Direction [get]
 
- Properties inherited from C5.IQueue< T >
bool AllowsDuplicates [get]
 
this[int index] [get]
 Get the More...
 

Additional Inherited Members

- Events inherited from C5.ICollectionValue< T >
CollectionChangedHandler< T > CollectionChanged
 The change event. Will be raised for every change operation on the collection. More...
 
CollectionClearedHandler< T > CollectionCleared
 The change event. Will be raised for every clear operation on the collection. More...
 
ItemsAddedHandler< T > ItemsAdded
 The item added event. Will be raised for every individual addition to the collection. More...
 
ItemInsertedHandler< T > ItemInserted
 The item inserted event. Will be raised for every individual insertion to the collection. More...
 
ItemsRemovedHandler< T > ItemsRemoved
 The item removed event. Will be raised for every individual removal from the collection. More...
 
ItemRemovedAtHandler< T > ItemRemovedAt
 The item removed at event. Will be raised for every individual removal at from the collection. More...
 

Detailed Description

A read-only wrapper for a generic indexable queue (allows indexing).

Suitable for wrapping a T:C5.CircularQueue`1

Template Parameters
TThe item type.

Constructor & Destructor Documentation

C5.GuardedQueue< T >.GuardedQueue ( IQueue< T >  queue)

Wrap a queue in a read-only wrapper

Parameters
queueThe queue

Member Function Documentation

T C5.GuardedQueue< T >.Dequeue ( )

Exceptions
ReadOnlyCollectionExceptionsince this is a read-only wrapper
Returns
-

Implements C5.IQueue< T >.

void C5.GuardedQueue< T >.Enqueue ( item)

Exceptions
ReadOnlyCollectionExceptionsince this is a read-only wrapper
Returns
-

Implements C5.IQueue< T >.

Property Documentation

bool C5.GuardedQueue< T >.AllowsDuplicates
get

T C5.GuardedQueue< T >.this[int i]
get

Index into the wrapped queue

Parameters
i
Returns

The documentation for this class was generated from the following file: