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

FIX::CheckSumConvertor Struct Reference

Converts checksum to/from a string. More...

#include <FieldConvertors.h>

List of all members.

Static Public Member Functions

static std::string convert (long value) throw ( FieldConvertError )
static bool convert (const std::string &value, long &result)
static long convert (const std::string &value) throw ( FieldConvertError )

Detailed Description

Converts checksum to/from a string.

Definition at line 174 of file FieldConvertors.h.


Member Function Documentation

static long FIX::CheckSumConvertor::convert ( const std::string &  value  )  throw ( FieldConvertError ) [inline, static]

Definition at line 193 of file FieldConvertors.h.

References convert().

00195   {
00196     return IntConvertor::convert( value );
00197   }

static bool FIX::CheckSumConvertor::convert ( const std::string &  value,
long &  result 
) [inline, static]

Definition at line 188 of file FieldConvertors.h.

References convert().

00189   {
00190     return IntConvertor::convert( value, result );
00191   }

static std::string FIX::CheckSumConvertor::convert ( long  value  )  throw ( FieldConvertError ) [inline, static]

Definition at line 176 of file FieldConvertors.h.

References FIX::integer_to_string_padded().

Referenced by convert().

00178   {
00179     if ( value > 255 || value < 0 ) throw FieldConvertError();
00180     char result[4];
00181     if( integer_to_string_padded(result, sizeof(result), value, 3, '0') != result )
00182     {
00183       throw FieldConvertError();
00184     }
00185     return std::string( result, 3 );
00186   }


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

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