Index  Source Files  Annotated Class List  Alphabetical Class List  Class Hierarchy  Graphical Class Hierarchy 

FIX::header_order Struct Reference

Sorts fields in correct header order. More...

#include <MessageSorters.h>

List of all members.

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 37 of file MessageSorters.h.


Member Function Documentation

static bool FIX::header_order::compare ( const int &  x,
const int &  y 
) [inline, static]

Definition at line 39 of file MessageSorters.h.

References getOrderedPosition().

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

00040   {
00041     int orderedX = getOrderedPosition( x );
00042     int orderedY = getOrderedPosition( y );
00043 
00044     if ( orderedX && orderedY )
00045       return orderedX < orderedY;
00046     else
00047       if ( orderedX )
00048         return true;
00049       else
00050         if ( orderedY )
00051           return false;
00052         else
00053           return x < y;
00054   }

static int FIX::header_order::getOrderedPosition ( const int &  field  )  [inline, static]

Definition at line 56 of file MessageSorters.h.

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

Referenced by compare().

00057   {
00058     switch ( field )
00059     {
00060       case FIELD::BeginString: return 1;
00061       case FIELD::BodyLength: return 2;
00062       case FIELD::MsgType: return 3;
00063       default: return 0;
00064     };
00065   }


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

Generated on Mon Apr 5 21:00:08 2010 for QuickFIX by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2001