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

Field that contains a double value. More...

#include <Field.h>

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

Public Member Functions

 DoubleField (int field, double data, int padding=0)
 
 DoubleField (int field)
 
void setValue (double value, int padding=0)
 
double getValue () const throw ( IncorrectDataFormat )
 
 operator double () 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. More...
 
int getField () const
 
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 double value.

Definition at line 400 of file Field.h.

Constructor & Destructor Documentation

◆ DoubleField() [1/2]

FIX::DoubleField::DoubleField ( int  field,
double  data,
int  padding = 0 
)
inlineexplicit

Definition at line 403 of file Field.h.

403  : public FieldBase
404 {

◆ DoubleField() [2/2]

FIX::DoubleField::DoubleField ( int  field)
inline

Definition at line 405 of file Field.h.

405  :
406  explicit IntField( int field, int data )

Member Function Documentation

◆ getValue()

double FIX::DoubleField::getValue ( ) const
throw (IncorrectDataFormat
)
inline

Definition at line 410 of file Field.h.

412  { setString( IntConvertor::convert( value ) ); }
413  int getValue() const throw ( IncorrectDataFormat )
414  { try

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

◆ operator double()

FIX::DoubleField::operator double ( ) const
inline

Definition at line 415 of file Field.h.

415  { return IntConvertor::convert( getString() ); }
416  catch( FieldConvertError& )

References FIX::IntConvertor::convert(), and FIX::FieldBase::getString().

◆ setValue()

void FIX::DoubleField::setValue ( double  value,
int  padding = 0 
)
inline

Definition at line 408 of file Field.h.

409 : FieldBase( field, "" ) {}

The documentation for this class was generated from the following file:
FIX::IntConvertor::convert
static std::string convert(signed_int value)
Definition: FieldConvertors.h:170
FIX::FieldBase::setString
void setString(const std::string &string)
Definition: Field.h:170
FIX::FieldBase::FieldBase
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:114
FIX::DoubleField::getValue
double getValue() const
Definition: Field.h:410
FIX::FieldBase::getString
const std::string & getString() const
Get the string representation of the fields value.
Definition: Field.h:186

Generated on Wed Apr 29 2020 19:41:30 for QuickFIX by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2001