#include <SimplygonSDK.h>
ITable is the base class for tables objects, where items are added into an id-indexed array of objects.
Definition at line 6850 of file SimplygonSDK.h.
◆ AddItem()
virtual rid SimplygonSDK::ITable::AddItem |
( |
IObject * |
item | ) |
|
|
pure virtual |
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().
- Parameters
-
item | is the item that is to be added to the table |
- Returns
- the id of the added item in the table
◆ Clear()
virtual void SimplygonSDK::ITable::Clear |
( |
| ) |
|
|
pure virtual |
Clears the table, and removes all items. If AddItem is called after Clear, the item ids will start over from 0
◆ Copy()
virtual void SimplygonSDK::ITable::Copy |
( |
ITable * |
src | ) |
|
|
pure virtual |
Clears the current table and copies the items from a source table.
- Parameters
-
◆ 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, the return will be NULL.
- Parameters
-
name | is the string that is to be searched for |
- Returns
- the matching object, or NULL if no match was found
◆ FindItemId()
virtual rid SimplygonSDK::ITable::FindItemId |
( |
const char * |
name | ) |
|
|
pure virtual |
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.
- Parameters
-
name | is the string that is to be searched for |
- Returns
- the id of the found object, or -1 if no match was found
◆ GetClass()
virtual const char* SimplygonSDK::ITable::GetClass |
( |
| ) |
|
|
virtual |
◆ GetItem()
Returns the i:th item, using the id of the item
- Parameters
-
id | is the id of the requested object |
- Returns
- the found object
◆ GetItemsCount()
virtual unsigned int SimplygonSDK::ITable::GetItemsCount |
( |
| ) |
|
|
pure virtual |
Gets 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.
- Returns
- the itemcount of the table
◆ IsA()
virtual bool SimplygonSDK::ITable::IsA |
( |
const char * |
type | ) |
const |
|
virtual |
◆ IsClassA()
static bool SimplygonSDK::ITable::IsClassA |
( |
const char * |
type | ) |
|
|
inlinestatic |
The IsClassA function returns true if ITable is a or is a descendant of the class named as the type parameter
- Parameters
-
type | is the name of the class to check if the class is, or is a descendant of |
- Returns
- true if the class is of the specified class, false if not
Definition at line 6871 of file SimplygonSDK.h.
◆ RemoveItem()
virtual void SimplygonSDK::ITable::RemoveItem |
( |
rid |
id | ) |
|
|
pure virtual |
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.
- Parameters
-
id | the id of the object that should be removed |
◆ SafeCast()
SafeCast makes sure the pointer is of a class that can be cast into a ITable pointer, and if this is possible, returns the cast pointer.
- Parameters
-
ptr | is the pointer to be cast into a ITable pointer |
- Returns
- a pointer to the ITable object, if the cast can be made, and a NULL pointer otherwise
Definition at line 6884 of file SimplygonSDK.h.
◆ SetItem()
virtual void SimplygonSDK::ITable::SetItem |
( |
rid |
id, |
|
|
IObject * |
item |
|
) |
| |
|
pure virtual |
Sets an item in the table. The id must exist in the table.
- Parameters
-
id | is the id that is to be set |
item | is the object set to the id |
The documentation for this class was generated from the following file: