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

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

#include <FieldConvertors.h>

Static Public Member Functions

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

Detailed Description

Converts character to/from a string.

Definition at line 372 of file FieldConvertors.h.

Member Function Documentation

◆ convert() [1/3]

static std::string FIX::CharConvertor::convert ( char  value)
inlinestatic

Definition at line 374 of file FieldConvertors.h.

375 {
376 if( value == '\0' ) return "";
377 return std::string( 1, value );
378 }

Referenced by FIX::DataDictionary::checkValidFormat(), convert(), FIX::CharField::getValue(), and FIX::CharField::setValue().

◆ convert() [2/3]

static char FIX::CharConvertor::convert ( const std::string &  value)
throw (FieldConvertError
)
inlinestatic

Definition at line 387 of file FieldConvertors.h.

389 {
390 char result = '\0';
391 if( !convert( value, result ) )
392 throw FieldConvertError(value);
393 else
394 return result;
395 }
static std::string convert(char value)

References convert().

◆ convert() [3/3]

static bool FIX::CharConvertor::convert ( const std::string &  value,
char &  result 
)
inlinestatic

Definition at line 380 of file FieldConvertors.h.

381 {
382 if( value.size() != 1 ) return false;
383 result = value[0];
384 return true;
385 }

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

Generated on Sun Mar 31 2024 07:07:24 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001