EMA C++ Developers Guide : 3 OMM Containers and Messages : 3.4 Working with OMM Messages : 3.4.2 Example: Extracting Information from the GenericMsg Class
 
3.4.2 Example: Extracting Information from the GenericMsg Class
The following example illustrates how to extract information from the GenericMsg class.
 
 
void decode( const GenericMsg& genMsg )
{
if ( genMsg.hasName() )
cout << endl << "Name: " << genMsg.getName();
 
if ( genMsg.hasHeader() )
const EmaBuffer& header = genMsg.getHeader();
 
switch ( genMsg.getPayload().getDataType() )
{
case DataType::FieldListEnum :
decode( genMsg.getPayload().getFieldList() );
break
}
}