#include <SimplygonSDK.h>
IObjectCollection and its specializations handles a collection of IObjects. There are methods for adding, removing and iterating through the objects.
Definition at line 8117 of file SimplygonSDK.h.
◆ AddObject()
virtual rhandle SimplygonSDK::IObjectCollection::AddObject |
( |
IObject * |
obj | ) |
|
|
pure virtual |
Adds an object to the collection. The handle refers to the object until the object is removed from the collection again.
- Parameters
-
obj | is the object that is to be added to the collection |
- Returns
- the handle of the added object in the collection
◆ AddObjectSorted()
virtual rhandle SimplygonSDK::IObjectCollection::AddObjectSorted |
( |
IObject * |
obj, |
|
|
bool |
ascending |
|
) |
| |
|
pure virtual |
Adds an object to the collection, as AddObject, but sorts the object into the collection based on its name.
- Parameters
-
obj | is the object that is to be added to the collection |
ascending | determines the sorting order |
- Returns
- the handle of the added object in the collection
◆ FindObject()
Finds a named object in the collection. The first object with this name is returned. The search is case-sensitive.
- Parameters
-
name | is the name of an object in the collection |
- Returns
- the object with the relevant name, or NULL if none is found
◆ GetClass()
virtual const char* SimplygonSDK::IObjectCollection::GetClass |
( |
| ) |
|
|
virtual |
◆ GetFirstItem()
virtual rhandle SimplygonSDK::IObjectCollection::GetFirstItem |
( |
| ) |
|
|
pure virtual |
Returns the start of the collection. The handle returned refers to the first object in the collection. If the handle is NULL, then the collection is empty.
- Returns
- the first item in collection, or NULL if collection is empty
◆ GetItem()
virtual rhandle SimplygonSDK::IObjectCollection::GetItem |
( |
unsigned int |
index | ) |
|
|
pure virtual |
Returns the handle of the i:th item
- Parameters
-
index | is the index of an object in the collection |
- Returns
- the handle of the object with the relevant index
◆ GetItemAsObject()
Returns the object of the i:th item
- Parameters
-
index | is the index of an object in the collection |
- Returns
- the object with the relevant index
◆ GetItemCount()
virtual unsigned int SimplygonSDK::IObjectCollection::GetItemCount |
( |
| ) |
|
|
pure virtual |
Get the number of items in the collection.
- Returns
- the number of items in the collection
◆ GetItemsObject()
Gets the object the handle is referring to.
- Parameters
-
objhandle | is the handle of an object in the collection |
- Returns
- the object associated with the handle
◆ GetNextItem()
virtual rhandle SimplygonSDK::IObjectCollection::GetNextItem |
( |
rhandle |
objhandle | ) |
|
|
pure virtual |
Returns the handle to the next item in the collection. Use GetFirstItem and this method to step through the collection. If the return is NULL, the end of the collection has been reached.
- Parameters
-
objhandle | is the handle of an object i |
- Returns
- the handle of the object i+1
◆ IsA()
virtual bool SimplygonSDK::IObjectCollection::IsA |
( |
const char * |
type | ) |
const |
|
virtual |
◆ IsClassA()
static bool SimplygonSDK::IObjectCollection::IsClassA |
( |
const char * |
type | ) |
|
|
inlinestatic |
The IsClassA function returns true if IObjectCollection 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 8138 of file SimplygonSDK.h.
◆ IsItemInCollection()
virtual bool SimplygonSDK::IObjectCollection::IsItemInCollection |
( |
rhandle |
objhandle | ) |
|
|
pure virtual |
Returns true if the item is in the collection
- Parameters
-
objhandle | is the handle of an object to be checked for |
- Returns
- true if the collection contains the object, false otherwise
◆ IsObjectInCollection()
virtual bool SimplygonSDK::IObjectCollection::IsObjectInCollection |
( |
IObject * |
pobj | ) |
|
|
pure virtual |
Returns true if the object is in the collection
- Parameters
-
pobj | is the object to be checked for |
- Returns
- true if the collection contains pobj, false otherwise
◆ RemoveAllItems()
virtual void SimplygonSDK::IObjectCollection::RemoveAllItems |
( |
| ) |
|
|
pure virtual |
Removes all items from the collection.
◆ RemoveItem()
virtual rhandle SimplygonSDK::IObjectCollection::RemoveItem |
( |
rhandle |
objhandle | ) |
|
|
pure virtual |
Removes an item from the collection. The handle returned is the first item after this item that is in the collection. If the return is NULL, the item was the last item in the collection. Warning! The handle is invalid after the removal of the object.
- Parameters
-
objhandle | is the handle of the object that is to be removed |
- Returns
- the handle to the item following the removed one, or NULL if collection is now empty
◆ RemoveObject()
virtual void SimplygonSDK::IObjectCollection::RemoveObject |
( |
IObject * |
pobj | ) |
|
|
pure virtual |
Removes an object from the collection. Only the first occurance of the object is removed from the collection.
- Parameters
-
pobj | is the object that is to be removed |
◆ SafeCast()
SafeCast makes sure the pointer is of a class that can be cast into a IObjectCollection pointer, and if this is possible, returns the cast pointer.
- Parameters
-
- Returns
- a pointer to the IObjectCollection object, if the cast can be made, and a NULL pointer otherwise
Definition at line 8151 of file SimplygonSDK.h.
The documentation for this class was generated from the following file: