Skip to main content

ERUCES::TEObjectContainer

#include <teobjcontainer.h>

The TEObjectContainer class defines a container for objects and provides methods for managing those objects.

Private Attrib

TypeNameDescription
TEObjectContainerImpl *m_pImpl

Public Member Functions

MemberDescription
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) constThe [] 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() constThe size method gets the size of the container.
bool empty() constThe 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

ParameterDescription
idxIndex 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

ParameterDescription
idxIndex 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

ParameterDescription
containerSpecifies 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

ParameterDescription
idxPosition where the object will be inserted.
teobjPointer 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

ParameterDescription
teobjPointer 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

ParameterDescription
idxThe position from which the object will be erased.