FIX::header_order Struct Reference

Sorts fields in correct header order. More...

`#include <MessageSorters.h>`

## Static Public Member Functions

static bool | compare (const int x, const int y)
static int | getOrderedPosition (const int field)

## Detailed Description

Sorts fields in correct header order.

Definition at line 38 of file MessageSorters.h.

## Member Function Documentation

## compare()

static bool FIX::header_order::compare | ( | const int | x,
|  | const int | y
| ) |  |

inline static

Definition at line 40 of file MessageSorters.h.

{
int orderedX = getOrderedPosition( x );
int orderedY = getOrderedPosition( y );
if ( orderedX && orderedY )
return orderedX < orderedY;
else
if ( orderedX )
return true;
else
if ( orderedY )
return false;
else
return x < y;
}
FIX::header_order::getOrderedPosition
static int getOrderedPosition(const int field)
Definition: MessageSorters.h:57

References getOrderedPosition().

Referenced by FIX::message_order::operator()().

## getOrderedPosition()

static int FIX::header_order::getOrderedPosition | ( | const int | field | ) |

inline static

Definition at line 57 of file MessageSorters.h.

{
switch ( field )
{
case FIELD::BeginString: return 1;
case FIELD::BodyLength: return 2;
case FIELD::MsgType: return 3;
default: return 0;
};
}

Referenced by compare().

The documentation for this struct was generated from the following file:

- MessageSorters.h