OnixS C++ CME Market Data Handler  2.56.0.0
New FIX Message Interface

In order to provide consistency between different products, classes implementing FIX messaging services were redesigned to follow concepts presented in latest OnixS C++ FIX Engine.

Message represents heavy-weight object and holds all the data which was previously decoded from network packets transmitted by MDP. It's fully copied on assignment or copy construction and disposing of internal structures takes place at instance destruction.

FIX field related operations now available via OnixS::CME::MarketData::FieldSet class from which OnixS::CME::MarketData::Message class is now derived.

In contrast, OnixS::CME::MarketData::Group and OnixS::CME::MarketData::GroupInstance classes are now light-weight wrappers over internal structures stored in OnixS::CME::MarketData::Message class.

Warning
Instances of OnixS::CME::MarketData::Group and OnixS::CME::MarketData::GroupInstance classes refer to data internally stored in instance of OnixS::CME::MarketData::Message class from which they were obtained. Therefore, OnixS::CME::MarketData::Message instance must be kept while working with instances of noted classes. Accessing instance of OnixS::CME::MarketData::Group and OnixS::CME::MarketData::GroupInstance classes after releasing Releasing OnixS::CME::MarketData::Message instance may lead to unpredictable results.

Null Messages, Repeating Groups and Repeating Groups Instances

OnixS::CME::MarketData::Message, OnixS::CME::MarketData::Group and OnixS::CME::MarketData::GroupInstance classes support 'null' state which can be treated as pointer in null state. This state allows users to have instances of noted classes as members and local variables.

Each of noted classes provides mechanism of checking its state. Casting instance to boolean type can be used to check whether instance is not null and refers to a valid data.

Example

Following code depicts how market data entries from incremental refresh may be traversed using new FIX messaging services:

Message message = book.message();
if (message)
{
if (message.type() == "X")
{
const Group mdEntries = refresh.getOptionalGroup(Tags::NoMDEntries);
if (mdEntries)
{
for (size_t index = 0;
index != mdEntries.size();
++index)
{
const GroupInstance mdEntry(mdEntries[index]);
const FieldValueRef securityId = mdEntry.get(Tags::SecurityId);
if (securityId)
{
cout
<< "MD Entry #"
<< (index + 1)
<< " refers to secutity id="
<< static_cast<unsigned int>(securityId)
<< ". "
<< endl;
}
}
}
}
}