B2BITS FIX Antenna C++  2.31.0
Public Member Functions | List of all members
Engine::FixFieldsFunctor Class Referenceabstract

Base class for iterating over fields of FIXMessage. More...

#include <B2BITS_FixFieldsContainer.h>

Public Member Functions

virtual bool needsRole () const
virtual void operator() (int tag, const Engine::AsciiString &value, int role)=0
 operate on a field of a FIXMessage More...
virtual ~FixFieldsFunctor ()

Detailed Description

Base class for iterating over fields of FIXMessage.

For instance the following code prints all fields of the message to std::cout

struct MessageDumper: public FixFieldsFunctor { void operator()(int tag, const Engine::AsciiString& value, int role) { std::cout << tag << '=' << value.data() << std::endl; } };

FIXMessage* msg; // fill it in MessageDumper dumper; msg->apply(dumper);

Constructor & Destructor Documentation

◆ ~FixFieldsFunctor()

virtual Engine::FixFieldsFunctor::~FixFieldsFunctor ( )

Member Function Documentation

◆ needsRole()

virtual bool Engine::FixFieldsFunctor::needsRole ( ) const

◆ operator()()

virtual void Engine::FixFieldsFunctor::operator() ( int  tag,
const Engine::AsciiString value,
int  role 
pure virtual

operate on a field of a FIXMessage

valuenon-owning reference to the value valid within the call.
rolefield role (FixField::FieldRole)