Cogs.Core
|
Typed collection of components. More...
#include <ComponentCollection.h>
Classes | |
class | ComponentCollectionIterator |
Iterator type for iterating over typed component collections. More... | |
Public Member Functions | |
ComponentCollectionIterator | begin () |
Iterator to the beginning of the collection. | |
ComponentCollectionIterator | end () |
Iterator to the end of the collection. | |
![]() | |
ComponentCollectionIterator | begin () const |
Iterator to the beginning of the collection. | |
ComponentCollectionIterator | end () const |
Iterator to the end of the collection. | |
COGSFOUNDATION_API | ComponentCollectionBase () |
Creates an empty component collection. | |
COGSFOUNDATION_API void | add (ComponentHandle component) |
Adds the given component handle to the collection. | |
COGSFOUNDATION_API void | remove (ComponentHandle component) |
Removes the given component from the collection. | |
COGSFOUNDATION_API void | clear () |
Clears the contents of the collection. | |
size_t | size () const |
Get the size of the collection. | |
const ComponentHandle & | operator[] (size_t index) const |
Get the component at the given index. | |
Typed collection of components.
Holds a set of components by untyped handles, but makes it possible to iterate over the collection in a typed manner.
Definition at line 156 of file ComponentCollection.h.
|
inline |
Iterator to the beginning of the collection.
Definition at line 222 of file ComponentCollection.h.
|
inline |
Iterator to the end of the collection.
Definition at line 229 of file ComponentCollection.h.
References Cogs::ComponentModel::ComponentCollectionBase::size().