A Collection class for displayable object collections
More...
Inherits IList< TObj >.
|
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...
|
|
|
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...
|
|
A Collection class for displayable object collections
- Template Parameters
-
◆ Add()
void Add |
( |
TObj |
dispObject | ) |
|
Add a new display object to the display object collection.
- Parameters
-
dispObject | display object to be added |
- Exceptions
-
ArgumentNullException | if dispObject is null |
◆ Contains()
bool Contains |
( |
TObj |
item | ) |
|
Determines whether this collection contains a specific value.
- Parameters
-
item | The 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
-
array | destination array |
arrayIndex | array index at which to start in array |
- Exceptions
-
ArgumentNullException | If array is null |
ArgumentOutOfRangeException | If arrayIndex is less than 0 |
ArgumentException | If 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()
Retrieve a list index for an object.
- Parameters
-
item | item 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
-
index | position at which to insert |
dispObject | item to be inserted |
- Exceptions
-
ArgumentOutOfRangeException | index is outside the range 0..Count-1 |
ArgumentNullException | dispObject is a null reference |
◆ Remove()
bool Remove |
( |
TObj |
dispObject | ) |
|
Remove an object from the object collection
- Parameters
-
dispObject | object 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
-
index | Index at which to remove the display object. |
◆ IsReadOnly
Clarifies that the collection is not Readonly.
Property is required by the IList interface.
◆ this[int index]
Access one of the objects in the collection by index.
- Parameters
-
- Returns
- object in the collection.
- Exceptions
-
ArgumentOutOfRangeException | If index is outside the range 0...Count-1 |