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.

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)

References getOrderedPosition().

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

◆ getOrderedPosition()

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

Definition at line 57 of file MessageSorters.h.

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 }

Referenced by compare().


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

Generated on Mon Oct 14 2024 06:04:44 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001