OnixS C++ B3 BOE Binary Order Entry  1.2.0
API Documentation
Repeating Groups

The OnixS::B3::BOE::Messaging::SbeGroup class provides access to repeating group entries. The OnixS::B3::BOE::Messaging::SbeGroupEntry class provides access to repeating group entry fields.

To get/set a field value of a repeating group entry, use the corresponding method of the strongly typed repeating group entry class.

Example

using namespace OnixS::B3::BOE;
using namespace OnixS::B3::BOE::Messaging;
typedef MessageHolder<NewOrderCross106> NewOrderCross;
NewOrderCross newOrderCross;
const UInt8 NoSidesGroupSize = 2;
// Set the Sides group size and get the corresponding SbeGroup instance.
NewOrderCross106::Sides sides = newOrderCross->sides(NoSidesGroupSize);
// Set field values of the first repeating group entry.
sides[0].setSide(Side::Buy);
sides[0].setClOrdId(2922);
// Set field values of the second repeating group entry.
sides[1].setSide(Side::Sell);
sides[1].setClOrdId(3326);
// Get field values of the first repeating group entry.
Side::Enum side1 = sides[0].side();
ClOrdID id1 = sides[0].clOrdId();
// Get field values of the second repeating group entry.
Side::Enum side2 = sides[1].side();
ClOrdID id2 = sides[1].clOrdId();
// Iterate over all repeating group entries of the Sides group.
for (NewOrderCross106::Sides::Iterator iter = sides.begin(); iter != sides.end(); ++iter)
{
std::cout << "side=" << (*iter).side() << "; clOrdID=" << (*iter).clOrdId() << std::endl;
}