Index
Source Files
Annotated Class List
Alphabetical Class List
Class Hierarchy
Graphical Class Hierarchy
|
Converts checksum to/from a string. More...
#include <FieldConvertors.h>
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 ) |
Converts checksum to/from a string.
Definition at line 174 of file FieldConvertors.h.
| 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 }
1.6.1 written by Dimitri van Heesch,
© 1997-2001