# class SelectionSetTable

SelectionSetTable keeps a table of SelectionSet. Note that the table will make sure that the names of objects added are unique within the table, and will rename objects with non-unique names.

# Properties

Property Description
Name The name of the SelectionSetTable object. (Inherited from Object)

# 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(). (Inherited from Table)
AddObserver Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
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. (Inherited from Table)
Copy Clears the current table and copies the items from a source table. (Inherited from 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. (Inherited from Table)
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. (Inherited from Table)
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. (Inherited from Object)
GetItem Returns the i:th item, using the id of the item. (Inherited from Table)
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. (Inherited from 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. (Inherited from Object)
IsNull Returns true if the SelectionSetTable object is invalid. (Inherited from Object)
IsSameObjectAs Returns true if the SelectionSetTable object is valid. (Inherited from Object)
NonNull Returns true if the SelectionSetTable object is valid. (Inherited from Object)
PrintInfo Prints the content/info of the SelectionSetTable object to the log. (Inherited from Object)
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. (Inherited from Table)
RemoveNamedSelectionSet Removes a selection set from the table by name.
RemoveObserver Removes a previously added observer object. (Inherited from Object)
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. (Inherited from 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. (Inherited from Object)
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. (Inherited from Object)

# Properties details

# Name

The name of the SelectionSetTable object. (Inherited from Object)

# Syntax

// Setter
void SetName( const char * name ) const;

// Getter
spString GetName() const;

# SetName parameters

Type Name Min Max Description
const char * name New name of the object.

# GetName return value

Type: spString

# 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().

# Syntax

rid AddItem( const spObject & item ) const;

# Parameters

Type Name Min Max Description
Object item Is the item that is to be added to the table.

# Return value

Type: rid

# AddObserver

Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)

# Syntax

rid AddObserver( const spObserver & observer ) const;

# Parameters

Type Name Min Max Description
Observer observer Observer is the object that will receive events.

# Return value

Type: rid

# AddSelectionSet

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

# Syntax

rid AddSelectionSet( const spSelectionSet & selectionSet ) const;

# Parameters

Type Name Min Max Description
SelectionSet selectionSet The selection set to be added.

# Return value

Type: rid

# Clear

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

# Syntax

void Clear() const;

# Parameters

Clear takes no parameters.

# Copy

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

# Syntax

void Copy( const spTable & src ) const;

# Parameters

Type Name Min Max Description
Table src The table to copy.

# 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.

# Syntax

spObject FindItem( const char * name ) const;

# Parameters

Type Name Min Max Description
const char * name Is the string that is to be searched for.

# Return value

Type: Object

# 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.

# Syntax

rid FindItemId( const char * name ) const;

# Parameters

Type Name Min Max Description
const char * name Is the string that is to be searched for.

# Return value

Type: rid

# 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.

# Syntax

spSelectionSet FindSelectionSet( const char * name ) const;

# Parameters

Type Name Min Max Description
const char * name The string to be searched for.

# Return value

Type: SelectionSet

# 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.

# Syntax

rid FindSelectionSetId( const char * name ) const;

# Parameters

Type Name Min Max Description
const char * name The string to be searched for.

# Return value

Type: rid

# GetClass

Get the name of the SelectionSetTable class. (Inherited from Object)

# Syntax

spString GetClass() const;

# Parameters

GetClass takes no parameters.

# Return value

Type: spString

# GetItem

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

# Syntax

spObject GetItem( rid id ) const;

# Parameters

Type Name Min Max Description
rid id Is the id of the requested object.

# Return value

Type: Object

# 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.

# Syntax

unsigned int GetItemsCount() const;

# Parameters

GetItemsCount takes no parameters.

# Return value

Type: unsigned int

# GetSelectionSet

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

# Syntax

spSelectionSet GetSelectionSet( rid id ) const;

# Parameters

Type Name Min Max Description
rid id The id of the selection set in the table.

# Return value

Type: SelectionSet

# GetSelectionSetCount

Returns the number of selection sets in the table.

# Syntax

unsigned int GetSelectionSetCount() const;

# Parameters

GetSelectionSetCount takes no parameters.

# Return value

Type: unsigned int

# IsA

Returns true if SelectionSetTable is a or is a descendant of the class named as the type parameter. (Inherited from Object)

# Syntax

bool IsA( const char * type ) const;

# Parameters

Type Name Min Max Description
const char * type Name of the class to check if SelectionSetTable is, or is a descendant of.

# Return value

Type: bool

# IsNull

Returns true if the SelectionSetTable object is invalid. (Inherited from Object)

# Syntax

bool IsNull() const;

# Parameters

IsNull takes no parameters.

# Return value

Type: bool

# IsSameObjectAs

Returns true if the SelectionSetTable object is valid. (Inherited from Object)

# Syntax

bool IsSameObjectAs( const spObject & object ) const;

# Parameters

Type Name Min Max Description
Object object Object to compare with.

# Return value

Type: bool

# NonNull

Returns true if the SelectionSetTable object is valid. (Inherited from Object)

# Syntax

bool NonNull() const;

# Parameters

NonNull takes no parameters.

# Return value

Type: bool

# PrintInfo

Prints the content/info of the SelectionSetTable object to the log. (Inherited from Object)

# Syntax

void PrintInfo() const;

# Parameters

PrintInfo takes no parameters.

# 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.

# Syntax

void RemoveItem( rid id ) const;

# Parameters

Type Name Min Max Description
rid id The id of the object that should be removed.

# RemoveNamedSelectionSet

Removes a selection set from the table by name.

# Syntax

void RemoveNamedSelectionSet( const char * name ) const;

# Parameters

Type Name Min Max Description
const char * name The name of the set to be removed from to the table.

# RemoveObserver

Removes a previously added observer object. (Inherited from Object)

# Syntax

void RemoveObserver( rid observerId ) const;

# Parameters

Type Name Min Max Description
rid observerId ObserverId is the id returned by AddObserver when the observer was added.

# RemoveSelectionSet

Removes a selection set from the table by set ID.

# Syntax

void RemoveSelectionSet( rid id ) const;

# Parameters

Type Name Min Max Description
rid id The id of the selection set that is to be removed.

# SetItem

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

# Syntax

void SetItem( rid id , const spObject & item ) const;

# Parameters

Type Name Min Max Description
rid id Is the id that is to be set.
Object item Is the object set to the id.

# Static methods details

# IsClassA

Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)

# Syntax

static bool IsClassA( const char * type ) const;

# Parameters

Type Name Min Max Description
const char * type Name of the class to check if the class is, or is a descendant of.

# Return value

Type: bool

# 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. (Inherited from Object)

# Syntax

static spSelectionSetTable SafeCast( const spObject & object ) const;

# Parameters

Type Name Min Max Description
Object object Object to cast.

# Return value

Type: SelectionSetTable