FIX::CheckSumField Class Reference

Field that contains a checksum value. More...

`#include <Field.h>`

Inheritance diagram for FIX::CheckSumField:
[legend]
Collaboration diagram for FIX::CheckSumField:
[legend]

## Public Member Functions

| CheckSumField (int field, int data)
| CheckSumField (int field)
void | setValue (int value)
int | getValue () const throw ( IncorrectDataFormat )
| operator const int () const
Public Member Functions inherited from FIX::FieldBase
| FieldBase (int field, const std::string &string)
virtual | ~FieldBase ()
void | setField (int field)
void | setString (const std::string &string)
int | getField () const
| Get the fields integer tag. More...
const std::string & | getString () const
| Get the string representation of the fields value. More...
const std::string & | getFixString () const
| Get the string representation of the Field (i.e.) 55=MSFT[SOH]. More...
size_t | getLength () const
| Get the length of the fields string representation. More...
int | getTotal () const
| Get the total value the fields characters added together. More...
bool | operator< (const FieldBase &field) const
| Compares fields based on their tag numbers. More...

## Detailed Description

Field that contains a checksum value.

Definition at line 473 of file Field.h.

## Constructor & Destructor Documentation

## CheckSumField() [1/2]

FIX::CheckSumField::CheckSumField | ( | int | field,
|  | int | data
| ) |  |

inline explicit

Definition at line 476 of file Field.h.

: FieldBase( field, CheckSumConvertor::convert( data ) ) {}
FIX::CheckSumConvertor::convert
static std::string convert(int value)
Definition: FieldConvertors.h:279
FIX::FieldBase::FieldBase
FieldBase(int field, std::string::const_iterator valueStart, std::string::const_iterator valueEnd, std::string::const_iterator tagStart, std::string::const_iterator tagEnd)
Constructor which also calculates field metrics.
Definition: Field.h:76

## CheckSumField() [2/2]

FIX::CheckSumField::CheckSumField | ( | int | field | ) |

inline

Definition at line 478 of file Field.h.

: FieldBase( field, "" ) {}
FIX::FieldBase::FieldBase
FieldBase(int field, std::string::const_iterator valueStart, std::string::const_iterator valueEnd, std::string::const_iterator tagStart, std::string::const_iterator tagEnd)
Constructor which also calculates field metrics.
Definition: Field.h:76

## Member Function Documentation

## getValue()

int FIX::CheckSumField::getValue | ( |  | ) | const
throw | ( | IncorrectDataFormat
| ) |  |

inline

Definition at line 483 of file Field.h.

References FIX::CheckSumConvertor::convert(), FIX::FieldBase::getField(), and FIX::FieldBase::getString().

{ try
{ return CheckSumConvertor::convert( getString() ); }
catch( FieldConvertError& )
{ throw IncorrectDataFormat( getField(), getString() ); } }
FIX::FieldBase::getString
const std::string & getString() const
Get the string representation of the fields value.
Definition: Field.h:112
FIX::FieldBase::getField
int getField() const
Get the fields integer tag.
Definition: Field.h:108
FIX::CheckSumConvertor::convert
static std::string convert(int value)
Definition: FieldConvertors.h:279

## operator const int()

FIX::CheckSumField::operator const int | ( |  | ) | const

inline

Definition at line 488 of file Field.h.

{ return getValue(); }
FIX::CheckSumField::getValue
int getValue() const
Definition: Field.h:483

## setValue()

void FIX::CheckSumField::setValue | ( | int | value | ) |

inline

Definition at line 481 of file Field.h.

References FIX::CheckSumConvertor::convert(), and FIX::FieldBase::setString().

{ setString( CheckSumConvertor::convert( value ) ); }
FIX::CheckSumConvertor::convert
static std::string convert(int value)
Definition: FieldConvertors.h:279
FIX::FieldBase::setString
void setString(const std::string &string)
Definition: Field.h:100

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

- Field.h