## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iCollection Struct Reference

A collection object is for convenience of the script language. More...

`#include <iengine/collectn.h>`

Inheritance diagram for iCollection:

[legend]
List of all members.

## Public Member Functions

virtual void | AddObject (iObject *obj)=0
| Add an object to the collection.
virtual iObject * | FindObject (char *name) const =0
| Find an object with the given name inside this collection.
virtual iObject * | GetObject (int i) const =0
| Get an object by index (function version).
virtual int | GetObjectCount () const =0
| Get the number of objects in this collection.
virtual iObject * | operator[] (int i) const =0
| Get an object by index (operator version).
virtual iObject * | QueryObject ()=0
| Query the iObject for this collection.

## Detailed Description

A collection object is for convenience of the script language.

It is simply a collection of other objects.

Main creators of instances implementing this interface:

- iCollectionList::NewCollection()

Main ways to get pointers to this interface:

- iCollectionList::Get()
- iCollectionList::FindByName()

Main users of this interface:

- Engine stores them.
- Application uses them.

Definition at line 46 of file collectn.h.

## Member Function Documentation

virtual void iCollection::AddObject | ( | iObject * | obj | ) | `[pure virtual]`

| Add an object to the collection.

virtual iObject* iCollection::FindObject | ( | char * | name | ) | const`[pure virtual]`

| Find an object with the given name inside this collection.

virtual iObject* iCollection::GetObject | ( | int | i | ) | const`[pure virtual]`

| Get an object by index (function version).

virtual int iCollection::GetObjectCount | ( |  | ) | const`[pure virtual]`

| Get the number of objects in this collection.

virtual iObject* iCollection::operator[] | ( | int | i | ) | const`[pure virtual]`

| Get an object by index (operator version).

virtual iObject* iCollection::QueryObject | ( |  | ) | `[pure virtual]`

| Query the iObject for this collection.

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

- iengine/collectn.h