Public Member Functions | List of all members
FIX::CharField Class Reference

Field that contains a character value. More...

#include <Field.h>

Inheritance diagram for FIX::CharField:
Inheritance graph
[legend]
Collaboration diagram for FIX::CharField:
Collaboration graph
[legend]

Public Member Functions

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

Detailed Description

Field that contains a character value.

Definition at line 363 of file Field.h.

Constructor & Destructor Documentation

◆ CharField() [1/2]

FIX::CharField::CharField ( int  field,
char  data 
)
inlineexplicit

Definition at line 366 of file Field.h.

367: FieldBase( field, CharConvertor::convert( data ) ) {}
FieldBase(int tag, 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:80
static std::string convert(char value)

◆ CharField() [2/2]

FIX::CharField::CharField ( int  field)
inline

Definition at line 368 of file Field.h.

369: FieldBase( field, "" ) {}

Member Function Documentation

◆ getValue()

char FIX::CharField::getValue ( ) const
throw (IncorrectDataFormat
)
inline

Definition at line 373 of file Field.h.

374 { try
375 { return CharConvertor::convert( getString() ); }
376 catch( FieldConvertError& )
377 { throw IncorrectDataFormat( getTag(), getString() ); } }
const std::string & getString() const
Get the string representation of the fields value.
Definition Field.h:152
int getTag() const
Get the fields integer tag.
Definition Field.h:144

References FIX::CharConvertor::convert(), FIX::FieldBase::getString(), and FIX::FieldBase::getTag().

Referenced by operator char().

◆ operator char()

FIX::CharField::operator char ( ) const
inline

Definition at line 378 of file Field.h.

379 { return getValue(); }
char getValue() const
Definition Field.h:373

References getValue().

◆ setValue()

void FIX::CharField::setValue ( char  value)
inline

Definition at line 371 of file Field.h.

372 { setString( CharConvertor::convert( value ) ); }
void setString(const std::string &string)
Definition Field.h:136

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


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

Generated on Fri Sep 27 2024 13:45:21 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001