Static Public Member Functions | List of all members
FIX::CheckSumConvertor Struct Reference

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

#include <FieldConvertors.h>

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 212 of file FieldConvertors.h.

Member Function Documentation

◆ convert() [1/3]

static int FIX::CheckSumConvertor::convert ( const std::string &  value)
throw (FieldConvertError
)
inlinestatic

Definition at line 231 of file FieldConvertors.h.

233 {
234 return IntConvertor::convert( value );
235 }
static std::string convert(signed_int value)

References FIX::IntConvertor::convert().

◆ convert() [2/3]

static bool FIX::CheckSumConvertor::convert ( const std::string &  value,
int &  result 
)
inlinestatic

Definition at line 226 of file FieldConvertors.h.

227 {
228 return IntConvertor::convert( value, result );
229 }

References FIX::IntConvertor::convert().

◆ convert() [3/3]

static std::string FIX::CheckSumConvertor::convert ( int  value)
throw (FieldConvertError
)
inlinestatic

Definition at line 214 of file FieldConvertors.h.

216 {
217 if ( value > 255 || value < 0 ) throw FieldConvertError();
218 char result[3];
219 if( integer_to_string_padded(result, sizeof(result), value) != result )
220 {
221 throw FieldConvertError();
222 }
223 return std::string( result, sizeof( result ) );
224 }
char * integer_to_string_padded(char *buf, const size_t len, signed_int t, const char paddingChar='0')

References FIX::integer_to_string_padded().

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


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

Generated on Thu May 22 2025 08:23:50 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001