DirectOutput
DirectOutput framework R3 for virtual pinball cabinets.
Loading...
Searching...
No Matches
DirectOutput.Table.TableElementList Class Reference

List of TableElement objects. More...

Inheritance diagram for DirectOutput.Table.TableElementList:
Collaboration diagram for DirectOutput.Table.TableElementList:

Public Member Functions

void InitAssignedEffects (Table Table)
 Initializes the AssignedEffects for all TableElements in this list.
void FinishAssignedEffects ()
 Finishes the AssignedEffects for all TableElements in this list.
List< TableElementGetTableElementListForType (TableElementTypeEnum Type)
 Returns a list of the TableElement objects with the specified type.

void UpdateState (TableElementData Data)
 Method to update the state and/or add a entry to the list.
new void Add (TableElement TableElement)
 Adds a TableElement to the list.
void Add (TableElementTypeEnum TableElementType, int Number, int State)
 Method for adding a entry to the list.
void Add (string TableElementName, int State)
new bool Contains (TableElement TableElement)
 Checks if a specified TableElement is contained in the list.
bool Contains (TableElementTypeEnum TableElementType, int Number)
 Checks if a specified TableElement is contained in the list.
bool Contains (string TableElementName)
 Determines whether a table element with the specified name is contained in the list.
new bool Remove (TableElement TableElement)
 Removes the specified TableElement from the List.
bool Remove (TableElementTypeEnum TableElementType, int Number)
 Removes the TableElement with the specified TableElementType and Number from the list.
bool Remove (string TableElementName)
 Removes the table element with the specified name.
string[] GetTableElementDescriptors ()
 Gets the table element descriptors. NamedElements are returned as $Name. Numbered elemenst are returned with the first char describing the type of the table element (S=Solenoid,W=Switch,L=Lamp and so on) plus its number (e.g. S48 for solenoid 48)
delegate void TableElementValueChangedEventHandler (object sender, TableElementValueChangedEventArgs e)
 EventHandler for TableElementValueChanged events.
 TableElementList ()
 Initializes a new instance of the TableElementList class.
Public Member Functions inherited from DirectOutput.General.Generic.ExtList< T >
int IndexOf (T Item)
 Determines the index of a specific item.
void CopyTo (T[] Array, int ArrayIndex)
 Copies the elements of the ExtList to an Array, starting at a particular Array index.
IEnumerator< T > GetEnumerator ()
 Returns an enumerator that iterates through a ExtList.
void Add (T NewListItem)
 Adds a new item to the ExtList.
void AddRange (IEnumerable< T > Collection)
 Adds a list of items to the ExtList.
ExtList< T > Clone ()
 Creates a clone of the ExtList.
void Insert (int Index, T Item)
 Inserts an item to the ExtList at the specified Index.
void Clear ()
 Clears the ExtList.
bool Remove (T ItemToRemove)
 Romves a item from the ExtList.
void RemoveAt (int Index)
 Removes a item at a specified index.
bool Contains (T ItemToCheck)
 Checks wether the specified item is contained in the ExtList.
void Sort ()
 Sorts the ExtList.
void Sort (IComparer< T > Comparer)
 Sorts the ExtList.
void Sort (Comparison< T > Comparison)
 Sorts the elements in the entire ExtList using the specified System.Comparison<T>.
T[] ToArray ()
 Returns a array containg the ExtList items.
 ExtList ()
 ExtList (IEnumerable< T > EnumerableList)
void CopyTo (Array array, int index)
int Add (object value)
bool Contains (object value)
int IndexOf (object value)
void Insert (int index, object value)
void Remove (object value)

Properties

Dictionary< int, TableElementSwitch [get]
 Returns a dictionary of Switch table elements.
Dictionary< int, TableElementSolenoid [get]
 Returns a dictionary of Solenoid table elements.
Dictionary< int, TableElementLamp [get]
 Returns a dictionary of Lamp table elements.
Dictionary< int, TableElementGIString [get]
 Returns a dictionary of GIString table elements.
Dictionary< int, TableElementMech [get]
 Returns a dictionary of Mech table elements.
TableElement this[TableElementTypeEnum TableElementType, int Number] [get]
 Indexer for for List.
TableElement this[string TableElementName] [get]
 Gets the TableElement with the specified table element name.
Properties inherited from DirectOutput.General.Generic.ExtList< T >
bool IsReadOnly [get]
 This ExtList objects are not readonly.
Will always return false.
int Count [get]
 Number of items in the ExtList.
this[int Index] [get, set]
 Indexer of the ExtList.
Returns the item at the specified index.
bool IsSynchronized [get]
object SyncRoot [get]
bool IsFixedSize [get]

Events

TableElementValueChangedEventHandler TableElementValueChanged
 Is fired on changes of the value of any TableElement in this collection.
Events inherited from DirectOutput.General.Generic.ExtList< T >
EventHandler< EventArgs > BeforeClear
 Fires before the ExtList is cleared.
If a exception is trown within the events, the list is not cleared.
EventHandler< EventArgs > AfterClear
 Fires after the ExtList is cleared.
EventHandler< InsertEventArgs< T > > BeforeInsert
 Fires before a new item is inserted into the ExtList.
If a exception is occurs in the event, to item is not added. OnValidate is called prior to this method.

EventHandler< InsertEventArgs< T > > AfterInsert
 Fires after a new item is inserted into the ExtList.
OnValidate is called prior to this method.

EventHandler< RemoveEventArgs< T > > BeforeRemove
 Fires before a item is removed from the ExtList.
EventHandler< RemoveEventArgs< T > > AfterRemove
 Fires after a item is removed from the ExtList.
EventHandler< SetEventArgs< T > > BeforeSet
 Fires before a item is set in the ExtList. OnValidate is called prior to this method.
EventHandler< SetEventArgs< T > > AfterSet
 Fires after a item has been set in the ExtList.

Detailed Description

List of TableElement objects.

Constructor & Destructor Documentation

◆ TableElementList()

DirectOutput.Table.TableElementList.TableElementList ( )

Initializes a new instance of the TableElementList class.

Member Function Documentation

◆ Add() [1/3]

void DirectOutput.Table.TableElementList.Add ( string TableElementName,
int State )

◆ Add() [2/3]

new void DirectOutput.Table.TableElementList.Add ( TableElement TableElement)

Adds a TableElement to the list.

Parameters
TableElementThe table element to add.
Exceptions
System.ExceptionCant add null to the list of table elements or The TableElement {Type} {Number} cant be added to the list. Another entry with the same type and number does already exist.

◆ Add() [3/3]

void DirectOutput.Table.TableElementList.Add ( TableElementTypeEnum TableElementType,
int Number,
int State )

Method for adding a entry to the list.

Parameters
TableElementTypeType of entry to add.
NumberNumber of entry to add.
StateState of entry to add.
Exceptions
System.ExceptionCant add null to the list of table elements or The TableElement {Type} {Number} cant be added to the list. Another entry with the same type and number does already exist.

◆ Contains() [1/3]

bool DirectOutput.Table.TableElementList.Contains ( string TableElementName)

Determines whether a table element with the specified name is contained in the list.

Parameters
TableElementNameName of the table element.
Returns
true table element is contained in list; otherwise, false.

◆ Contains() [2/3]

new bool DirectOutput.Table.TableElementList.Contains ( TableElement TableElement)

Checks if a specified TableElement is contained in the list.

Parameters
TableElementTableElement to check.
Returns
true/false

◆ Contains() [3/3]

bool DirectOutput.Table.TableElementList.Contains ( TableElementTypeEnum TableElementType,
int Number )

Checks if a specified TableElement is contained in the list.

Parameters
TableElementTypeType of the TableElement to check.
NumberNumber of TableElement to check.
Returns
true/false

◆ FinishAssignedEffects()

void DirectOutput.Table.TableElementList.FinishAssignedEffects ( )

Finishes the AssignedEffects for all TableElements in this list.

◆ GetTableElementDescriptors()

string[] DirectOutput.Table.TableElementList.GetTableElementDescriptors ( )

Gets the table element descriptors. NamedElements are returned as $Name. Numbered elemenst are returned with the first char describing the type of the table element (S=Solenoid,W=Switch,L=Lamp and so on) plus its number (e.g. S48 for solenoid 48)

Returns
Array of table element descriptors

◆ GetTableElementListForType()

List< TableElement > DirectOutput.Table.TableElementList.GetTableElementListForType ( TableElementTypeEnum Type)

Returns a list of the TableElement objects with the specified type.

Note
This method does internaly create a new list of the specified table elements on every call. This is not very fast.

◆ InitAssignedEffects()

void DirectOutput.Table.TableElementList.InitAssignedEffects ( Table Table)

Initializes the AssignedEffects for all TableElements in this list.

◆ Remove() [1/3]

bool DirectOutput.Table.TableElementList.Remove ( string TableElementName)

Removes the table element with the specified name.

Parameters
TableElementNameName of the table element.
Returns
true if TableElement has been removed, otherwise false.

◆ Remove() [2/3]

new bool DirectOutput.Table.TableElementList.Remove ( TableElement TableElement)

Removes the specified TableElement from the List.

Parameters
TableElementTableElement to remove.
Returns
true if TableElement has been removed, otherwise false.

◆ Remove() [3/3]

bool DirectOutput.Table.TableElementList.Remove ( TableElementTypeEnum TableElementType,
int Number )

Removes the TableElement with the specified TableElementType and Number from the list.

Parameters
TableElementTypeTableElementType of the TableElement to remove.
NumberNumber of the TableElement to remove.
Returns
true if TableElement has been removed, otherwise false.

◆ TableElementValueChangedEventHandler()

delegate void DirectOutput.Table.TableElementList.TableElementValueChangedEventHandler ( object sender,
TableElementValueChangedEventArgs e )

EventHandler for TableElementValueChanged events.

Parameters
senderThe sender.
eThe TableElementValueChangedEventArgs instance containing the event data.

◆ UpdateState()

void DirectOutput.Table.TableElementList.UpdateState ( TableElementData Data)

Method to update the state and/or add a entry to the list.

Parameters
DataTable elemtn data for the update.

Property Documentation

◆ GIString

Dictionary<int, TableElement> DirectOutput.Table.TableElementList.GIString
get

Returns a dictionary of GIString table elements.

◆ Lamp

Dictionary<int, TableElement> DirectOutput.Table.TableElementList.Lamp
get

Returns a dictionary of Lamp table elements.

◆ Mech

Dictionary<int, TableElement> DirectOutput.Table.TableElementList.Mech
get

Returns a dictionary of Mech table elements.

◆ Solenoid

Dictionary<int, TableElement> DirectOutput.Table.TableElementList.Solenoid
get

Returns a dictionary of Solenoid table elements.

◆ Switch

Dictionary<int, TableElement> DirectOutput.Table.TableElementList.Switch
get

Returns a dictionary of Switch table elements.

◆ this[string TableElementName]

TableElement DirectOutput.Table.TableElementList.this[string TableElementName]
get

Gets the TableElement with the specified table element name.

The TableElement.

Parameters
TableElementNameName of the table element.
Returns

◆ this[TableElementTypeEnum TableElementType, int Number]

TableElement DirectOutput.Table.TableElementList.this[TableElementTypeEnum TableElementType, int Number]
get

Indexer for for List.

Parameters
TableElementTypeTableElementType of the TableElement
NumberNumber of TheTableElement
Returns
TableElement with specified TableElementType and Number

Event Documentation

◆ TableElementValueChanged

TableElementValueChangedEventHandler DirectOutput.Table.TableElementList.TableElementValueChanged

Is fired on changes of the value of any TableElement in this collection.


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