CVB.Net 14.0
DisplayObjectList< TObj > Class Template Referenceabstract

A Collection class for displayable object collections More...

Inherits IList< TObj >.

Public Member Functions

void Clear ()
 Clear all the display objects in this collection.
 
void Add (TObj dispObject)
 Add a new display object to the display object collection. More...
 
bool Remove (TObj dispObject)
 Remove an object from the object collection More...
 
IEnumerator< TObj > GetEnumerator ()
 IEnumerable implementation. More...
 
bool Contains (TObj item)
 Determines whether this collection contains a specific value. More...
 
void CopyTo (TObj[] array, int arrayIndex)
 Copy the whole collection into an array, starting at the given array index. More...
 
int IndexOf (TObj item)
 Retrieve a list index for an object. More...
 
void Insert (int index, TObj dispObject)
 Insert a new item at a defined list position. More...
 
void RemoveAt (int index)
 Remove the display object at the given index. More...
 

Properties

int Count [get]
 Number of objects currently inside the collection.
 
TObj this[int index] [get, set]
 Access one of the objects in the collection by index. More...
 
bool IsReadOnly [get]
 Clarifies that the collection is not Readonly. More...
 

Detailed Description

A Collection class for displayable object collections

Template Parameters
TObj
Type Constraints
TObj :OverlayBase 

Member Function Documentation

◆ Add()

void Add ( TObj  dispObject)

Add a new display object to the display object collection.

Parameters
dispObjectdisplay object to be added
Exceptions
ArgumentNullExceptionif dispObject is null

◆ Contains()

bool Contains ( TObj  item)

Determines whether this collection contains a specific value.

Parameters
itemThe object to locate in this collection.
Returns
true if item is found, false otherwise.

◆ CopyTo()

void CopyTo ( TObj[]  array,
int  arrayIndex 
)

Copy the whole collection into an array, starting at the given array index.

Parameters
arraydestination array
arrayIndexarray index at which to start in array
Exceptions
ArgumentNullExceptionIf array is null
ArgumentOutOfRangeExceptionIf arrayIndex is less than 0
ArgumentExceptionIf the number of elements in this collection is greater than the available space from arrayIndex to the end of the destination array

◆ GetEnumerator()

IEnumerator< TObj > GetEnumerator ( )

IEnumerable implementation.

Returns
Enumerator

◆ IndexOf()

int IndexOf ( TObj  item)

Retrieve a list index for an object.

Parameters
itemitem to retrieve the index for
Returns
index of item or -1 if the item is not contained in the list.

◆ Insert()

void Insert ( int  index,
TObj  dispObject 
)

Insert a new item at a defined list position.

Parameters
indexposition at which to insert
dispObjectitem to be inserted
Exceptions
ArgumentOutOfRangeExceptionindex is outside the range 0..Count-1
ArgumentNullExceptiondispObject is a null reference

◆ Remove()

bool Remove ( TObj  dispObject)

Remove an object from the object collection

Parameters
dispObjectobject to be removed from the collection
Returns
true if the object was removed, false otherwise

◆ RemoveAt()

void RemoveAt ( int  index)

Remove the display object at the given index.

Parameters
indexIndex at which to remove the display object.

Property Documentation

◆ IsReadOnly

bool IsReadOnly
get

Clarifies that the collection is not Readonly.

Property is required by the IList interface.

◆ this[int index]

TObj this[int index]
getset

Access one of the objects in the collection by index.

Parameters
indexindex
Returns
object in the collection.
Exceptions
ArgumentOutOfRangeExceptionIf index is outside the range 0...Count-1