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

Member Function Documentation

◆ convert() [1/3]

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

Definition at line 506 of file FieldConvertors.h.

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

507  {
508  if( value == '\0' ) return "";
509  return std::string( 1, value );
510  }

◆ convert() [2/3]

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

Definition at line 512 of file FieldConvertors.h.

513  {
514  if( value.size() != 1 ) return false;
515  result = value[0];
516  return true;
517  }

◆ convert() [3/3]

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

Definition at line 519 of file FieldConvertors.h.

References FIX::EmptyConvertor::convert().

521  {
522  char result = '\0';
523  if( !convert( value, result ) )
524  throw FieldConvertError(value);
525  else
526  return result;
527  }
static std::string convert(char value)

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

Generated on Thu Sep 5 2019 11:07:58 for QuickFIX by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001