# class SelectionSetTable

SelectionSetTable keeps a table of SelectionSet.

# Methods

Method Description
AddItem Adds an item to the table. The returned value is the id of the item within the table, which can be used to retrieve the item using GetItem().
AddSelectionSet Adds a selection set to the table. The returned value is the id of the selection set within the table.
Clear Clears the table, and removes all items. If AddItem is called after Clear, the item ids will start over from 0.
Copy Clears the current table and copies the items from a source table.
FindItem Finds a named item in the table. If multiple items have the same name, the first will be returned. If no item was found, null will be returned.
FindItemId Finds the id of an item in the table, using the name. If multiple items have the same name, the first will be returned. If no item was found, the return will be -1.
FindSelectionSet Finds a selection set in the table, using the name. If multiple selection sets have the same name, the first match will be returned. If the selection set was not found, null will be returned.
FindSelectionSetId Finds the id of a selection set in the table, using the name. If multiple selection sets have the same name, the first will be returned. If the selection set was not found, the return will be -1.
GetClass Get the name of the SelectionSetTable class.
GetItem Returns the i:th item, using the id of the item.
GetItemsCount The number of item id:s in the table. If an item has been removed, using RemoveItem, the id is still counted in this method. GetIdsCount also equals the id that will be applied to the next item added to the table.
GetSelectionSet Returns the i:th selection set, using the id of the selection set.
GetSelectionSetCount Returns the number of selection sets in the table.
IsA Returns true if SelectionSetTable is a or is a descendant of the class named as the type parameter.
IsNull Returns true if the SelectionSetTable object is invalid.
RemoveItem Removes an item, and invalidates the id. The id will not point at a valid item, until Clear is called and new items are added up until the id.
RemoveNamedSelectionSet Removes a selection set from the table by name.
RemoveSelectionSet Removes a selection set from the table by set ID.
SetItem Sets an item in the table. The id must exist in the table.

# Static methods

Method Description
IsClassA Returns true if the class is a or is a descendant of the class named as the type parameter.
SafeCast SafeCast makes sure the input object is of a class that can be cast into spSelectionSetTable, and if this is the case, returns the object cast into spSelectionSetTable.

# Methods details

# AddItem

Adds an item to the table. The returned value is the id of the item within the table, which can be used to retrieve the item using GetItem().

    # AddSelectionSet

    Adds a selection set to the table. The returned value is the id of the selection set within the table.

      # Clear

      Clears the table, and removes all items. If AddItem is called after Clear, the item ids will start over from 0.

        # Copy

        Clears the current table and copies the items from a source table.

          # FindItem

          Finds a named item in the table. If multiple items have the same name, the first will be returned. If no item was found, null will be returned.

            # FindItemId

            Finds the id of an item in the table, using the name. If multiple items have the same name, the first will be returned. If no item was found, the return will be -1.

              # FindSelectionSet

              Finds a selection set in the table, using the name. If multiple selection sets have the same name, the first match will be returned. If the selection set was not found, null will be returned.

                # FindSelectionSetId

                Finds the id of a selection set in the table, using the name. If multiple selection sets have the same name, the first will be returned. If the selection set was not found, the return will be -1.

                  # GetClass

                  Get the name of the SelectionSetTable class.

                    # GetItem

                    Returns the i:th item, using the id of the item.

                      # GetItemsCount

                      The number of item id:s in the table. If an item has been removed, using RemoveItem, the id is still counted in this method. GetIdsCount also equals the id that will be applied to the next item added to the table.

                        # GetSelectionSet

                        Returns the i:th selection set, using the id of the selection set.

                          # GetSelectionSetCount

                          Returns the number of selection sets in the table.

                            # IsA

                            Returns true if SelectionSetTable is a or is a descendant of the class named as the type parameter.

                              # IsNull

                              Returns true if the SelectionSetTable object is invalid.

                                # RemoveItem

                                Removes an item, and invalidates the id. The id will not point at a valid item, until Clear is called and new items are added up until the id.

                                  # RemoveNamedSelectionSet

                                  Removes a selection set from the table by name.

                                    # RemoveSelectionSet

                                    Removes a selection set from the table by set ID.

                                      # SetItem

                                      Sets an item in the table. The id must exist in the table.

                                        # Static methods details

                                        # IsClassA

                                        Returns true if the class is a or is a descendant of the class named as the type parameter.

                                          # SafeCast

                                          SafeCast makes sure the input object is of a class that can be cast into spSelectionSetTable, and if this is the case, returns the object cast into spSelectionSetTable.