EMA C++ Developers Guide : 3 OMM Containers and Messages : 3.1 Overview
 
3.1 Overview
Enterprise Message API supports a full set of OMM containers, messages, and primitives (e.g. FieldList, Map, RefreshMsg, Int). For simplicity, Enterprise Message API uses:
The “set / add” type of functionality to populate OMM containers, messages, and primitives
Set functionality is used to specify variables that occur once in an OMM container or message.
Add functionality is used to populate entries in OMM containers.
Set and add type methods return a reference to the modified object (for fluid interface usage).
The “get” type of functionality to read and extract data from OMM containers, messages, and primitives.Enterprise Message API uses a simple iterative approach to extract entries from OMM containers, one at a time. Applications iterate over every OMM container type in the same way.
While iterating, an application can apply a filtering mechanism. For example, while iterating over a FieldList, the application can specify a field ID or field name in which it is interested; the Enterprise Message API skips entries without matching identification. Individual container entries are extracted during iteration. Depending on the container type, the entry may contain:
Its own identity (e.g., field id)
An action to be applied to the received data (e.g., add action)
Permission information associated with the received data
An entry’s load and its data type.
The Enterprise Message API has two different ways of extracting an entry’s load:
Use ease-of-use interfaces to return references to contained objects (with reference type being based on the load’s data type)
Use the getLoad interface to return a reference to the base Data class. The getLoad interface enables more advanced applications to use the down-cast operation (if desired).
For details on ease of use interfaces and the down-cast operation, refer to Section 3.3.
To provide compile time-type safety on the set-type interfaces, Enterprise Message API provides the following, deeper inheritance structure:
All classes representing primitive / intrinsic data types inherit from the Data class (e.g. OmmInt, OmmBuffer, OmmRmtes, etc.).
OmmArray class inherits from the Data class. The OmmArray is treated as a primitive instead of a container, because it represents a set of primitives.
OmmError class inherits from the Data class. OmmError class is not an OMM data type.
All classes representing OMM containers (except OmmArray) inherit from the ComplexType class, which in turn inherits from the Data class (e.g., OmmXml, OmmOpaque, Map, Series, or Vector).
All classes representing OMM messages inherit from the Msg class, which in turn inherits from the ComplexType class (e.g., RefreshMsg, GenericMsg, or PostMsg).