mxmContainer Class Reference
[modularMX Runtime Platform Core]

Base class to all modularMX containers. More...

#include <mxmContainer.h>

Inheritance diagram for mxmContainer:

mxmObject mxmContainerInterface mxmInterface mxmList mxmPerlStyleHash mxmStringList mx::Framework::ComponentDescriptor List of all members.

Public Member Functions

 mxmContainer ()
 Default constructor.
 mxmContainer (mxmTypeDecider *item_type_decider)
 Pass to this constructor an appropriate type decider if you wish to restrict the set of possible mxmObject types that can be added to this container.
 ~mxmContainer ()
 Also toasts the encapsuled item type decider.
void clear (void)
 (Re)implementation for interface mxmContainerInterface.
void setItemTypeDecider (mxmTypeDecider *item_type_decider)
 Item type decider to be used from now on.

Protected Attributes

mxmTypeDeciderItemTypeDecider

Detailed Description

Base class to all modularMX containers.

When we purged the camera filesystem of the prohibitively large libstdc++ and installed our MX C++ mini-runtime instead, we somehow had to come up with a replacement for the widely used STL container templates, such as vector, list and map. These replacements are the subclasses to mxmContainer.

In contrast to the STL containers, modularMX containers manage items that are subclassed from mxmObject, allocated dynamically on the heap via new, and referenced by pointers. When added to a container, the ownership over an item is transferred to that container that will delete it porperly the moment it is destroyed itself.

The set of object types that can be added to a container can be, but does not have to be, restricted by installing an mxmTypeDecider with the container, that will then most likely use RTTI (runtime type information) to reject invalid types.

The items stored in a container can be investigated and possibly modified via iterators. To obtain an iterator for a given specific mxmContainer implementation, call its iterator() method, such as for example mxmList::iterator().

Author:
[khe] Kai Hergenroether


Constructor & Destructor Documentation

mxmContainer::mxmContainer mxmTypeDecider item_type_decider  ) 
 

Pass to this constructor an appropriate type decider if you wish to restrict the set of possible mxmObject types that can be added to this container.

The container assumes ownership over the type decider.


Member Function Documentation

void mxmContainer::setItemTypeDecider mxmTypeDecider item_type_decider  ) 
 

Item type decider to be used from now on.

The container assumes ownership over the type decider. A potentially previously installed decider gets deleted.


The documentation for this class was generated from the following files:
Generated on Fri Jun 29 17:21:04 2007 for MxPEG SDK by  doxygen 1.4.6