ERUCES::TEObjectContainer
#include <teobjcontainer.h>
The TEObjectContainer class defines a container for objects and provides methods for managing those objects.
Private Attrib
| Type | Name | Description |
|---|---|---|
| TEObjectContainerImpl * | m_pImpl |
Public Member Functions
| Member | Description |
|---|---|
TEObjectContainer() | The TEObjectContainer constructor is the default class constructor. |
TEObjectContainer(const TEObjectContainer &) | The TEObjectContainer constructor copies an object and saves the copy in a new container. |
~TEObjectContainer() | The TEObjectContainer destructor is the class destructor. |
const TEObject * operator[](uint32_t idx) const | The [] operator returns a constant pointer to the object at the position indicated by the given index. |
TEObject * operator[](uint32_t idx) | The [] operator returns a pointer to the object at the position indicated by the given index. |
TEObjectContainer & operator=(const TEObjectContainer &container) | The = operator assigns all objects in a container to another container. The objects in the destination container are cleared before the assignment. After the assignment the objects in the destination container are cloned objects from those in the original container. |
void insert(uint32_t idx, const TEObject *teobj) | The insert method inserts an object in a container. A copy of the object will be created. |
void add(const TEObject *teobj) | The add method adds an object to the container. A copy of the object will be created. |
uint32_t size() const | The size method gets the size of the container. |
bool empty() const | The empty method checks whether a container is empty. |
void clear() | The clear method clears all objects from a container. |
void erase(uint32_t idx) | The erase method erases an objects from a container. |
Member Function Documentation
TEObjectContainer()
The TEObjectContainer constructor is the default class constructor.
TEObjectContainer(const TEObjectContainer &)
The TEObjectContainer constructor copies an object and saves the copy in a new container.
~TEObjectContainer()
The TEObjectContainer destructor is the class destructor.
const TEObject * operator[](uint32_t idx) const
The [] operator returns a constant pointer to the object at the position indicated by the given index.
Parameters
| Parameter | Description |
|---|---|
idx | Index of the object to be obtained. |
Returns: Returns a constant pointer to the object.
TEObject * operator[](uint32_t idx)
The [] operator returns a pointer to the object at the position indicated by the given index.
Parameters
| Parameter | Description |
|---|---|
idx | Index of the object to be obtained. |
Returns: Returns a pointer to the object.
TEObjectContainer & operator=(const TEObjectContainer &container)
The = operator assigns all objects in a container to another container. The objects in the destination container are cleared before the assignment. After the assignment the objects in the destination container are cloned objects from those in the original container.
Parameters
| Parameter | Description |
|---|---|
container | Specifies a container whose objects will be assigned to the current container. |
Returns: Returns a reference to the current container object.
void insert(uint32_t idx, const TEObject *teobj)
The insert method inserts an object in a container. A copy of the object will be created.
Parameters
| Parameter | Description |
|---|---|
idx | Position where the object will be inserted. |
teobj | Pointer to the object to be inserted. |
void add(const TEObject *teobj)
The add method adds an object to the container. A copy of the object will be created.
Parameters
| Parameter | Description |
|---|---|
teobj | Pointer to the object to be added. |
uint32_t size() const
The size method gets the size of the container.
Returns: Returns the size of the container.
bool empty() const
The empty method checks whether a container is empty.
Returns: Returns a boolean value indicating whether the container is empty; TRUE = container is empty, FALSE = container is not empty.
void clear()
The clear method clears all objects from a container.
void erase(uint32_t idx)
The erase method erases an objects from a container.
Parameters
| Parameter | Description |
|---|---|
idx | The position from which the object will be erased. |