Static Public Member Functions | List of all members
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 
)
inlinestatic

Definition at line 40 of file MessageSorters.h.

References getOrderedPosition().

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

41  {
42  int orderedX = getOrderedPosition( x );
43  int orderedY = getOrderedPosition( y );
44 
45  if ( orderedX && orderedY )
46  return orderedX < orderedY;
47  else
48  if ( orderedX )
49  return true;
50  else
51  if ( orderedY )
52  return false;
53  else
54  return x < y;
55  }
static int getOrderedPosition(const int field)

◆ getOrderedPosition()

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

Definition at line 57 of file MessageSorters.h.

References FIX::FIELD::BeginString, FIX::FIELD::BodyLength, and FIX::FIELD::MsgType.

Referenced by compare().

58  {
59  switch ( field )
60  {
61  case FIELD::BeginString: return 1;
62  case FIELD::BodyLength: return 2;
63  case FIELD::MsgType: return 3;
64  default: return 0;
65  };
66  }
const int BeginString
const int BodyLength
const int MsgType

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

Generated on Thu Sep 5 2019 11:07:58 for QuickFIX by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001