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 | ) |

inline static

Definition at line 374 of file FieldConvertors.h.

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

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
| ) |  |

inline static

Definition at line 387 of file FieldConvertors.h.

{
char result = '\0';
if( !convert( value, result ) )
throw FieldConvertError(value);
else
return result;
}
FIX::CharConvertor::convert
static std::string convert(char value)
Definition FieldConvertors.h:374

References convert().

## convert() [3/3]

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

inline static

Definition at line 380 of file FieldConvertors.h.

{
if( value.size() != 1 ) return false;
result = value[0];
return true;
}

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

- FieldConvertors.h