Static Public Member Functions
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 (int value) throw ( FieldConvertError )
static bool convert (const std::string &value, int &result)
static int convert (const std::string &value) throw ( FieldConvertError )

Detailed Description

Converts checksum to/from a string.

Definition at line 277 of file FieldConvertors.h.


Member Function Documentation

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

Definition at line 279 of file FieldConvertors.h.

References FIX::integer_to_string_padded().

Referenced by convert(), FIX::CheckSumField::getValue(), and FIX::CheckSumField::setValue().

  {
    if ( value > 255 || value < 0 ) throw FieldConvertError();
    char result[4];
    if( integer_to_string_padded(result, sizeof(result), value, 3) != result )
    {
      throw FieldConvertError();
    }
    return std::string( result, 3 );
  }
static bool FIX::CheckSumConvertor::convert ( const std::string &  value,
int &  result 
) [inline, static]

Definition at line 291 of file FieldConvertors.h.

References convert().

  {
    return IntConvertor::convert( value, result );
  }
static int FIX::CheckSumConvertor::convert ( const std::string &  value) throw ( FieldConvertError ) [inline, static]

Definition at line 296 of file FieldConvertors.h.

References convert().

  {
    return IntConvertor::convert( value );
  }

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

Generated on Mon Sep 15 2014 01:23:57 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001