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

Field that contains a UTC time stamp value. More...

#include <Field.h>

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

Public Member Functions

 UtcTimeStampField (int field, const UtcTimeStamp &data, bool showMilliseconds=false)
 
 UtcTimeStampField (int field, bool showMilliseconds=false)
 
void setValue (const UtcTimeStamp &value)
 
UtcTimeStamp getValue () const throw ( IncorrectDataFormat )
 
 operator UtcTimeStamp () const
 
bool operator< (const UtcTimeStampField &rhs) const
 
bool operator== (const UtcTimeStampField &rhs) const
 
bool operator!= (const UtcTimeStampField &rhs) 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 UTC time stamp value.

Definition at line 392 of file Field.h.

Constructor & Destructor Documentation

◆ UtcTimeStampField() [1/2]

FIX::UtcTimeStampField::UtcTimeStampField ( int  field,
const UtcTimeStamp data,
bool  showMilliseconds = false 
)
inlineexplicit

Definition at line 395 of file Field.h.

396 : FieldBase( field, UtcTimeStampConvertor::convert( data, showMilliseconds ) ) {}
static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
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

◆ UtcTimeStampField() [2/2]

FIX::UtcTimeStampField::UtcTimeStampField ( int  field,
bool  showMilliseconds = false 
)
inline

Definition at line 397 of file Field.h.

398 : FieldBase( field, UtcTimeStampConvertor::convert( UtcTimeStamp(), showMilliseconds ) ) {}
static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
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()

UtcTimeStamp FIX::UtcTimeStampField::getValue ( ) const
throw (IncorrectDataFormat
)
inline

Definition at line 402 of file Field.h.

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

Referenced by operator!=(), operator<(), and operator==().

403  { try
405  catch( FieldConvertError& )
406  { throw IncorrectDataFormat( getField(), getString() ); } }
static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
const std::string & getString() const
Get the string representation of the fields value.
Definition: Field.h:112
int getField() const
Get the fields integer tag.
Definition: Field.h:108

◆ operator UtcTimeStamp()

FIX::UtcTimeStampField::operator UtcTimeStamp ( ) const
inline

Definition at line 407 of file Field.h.

408  { return getValue(); }
UtcTimeStamp getValue() const
Definition: Field.h:402

◆ operator!=()

bool FIX::UtcTimeStampField::operator!= ( const UtcTimeStampField rhs) const
inline

Definition at line 414 of file Field.h.

References getValue().

415  { return getValue() != rhs.getValue(); }
UtcTimeStamp getValue() const
Definition: Field.h:402

◆ operator<()

bool FIX::UtcTimeStampField::operator< ( const UtcTimeStampField rhs) const
inline

Definition at line 410 of file Field.h.

References getValue().

411  { return getValue() < rhs.getValue(); }
UtcTimeStamp getValue() const
Definition: Field.h:402

◆ operator==()

bool FIX::UtcTimeStampField::operator== ( const UtcTimeStampField rhs) const
inline

Definition at line 412 of file Field.h.

References getValue().

413  { return getValue() == rhs.getValue(); }
UtcTimeStamp getValue() const
Definition: Field.h:402

◆ setValue()

void FIX::UtcTimeStampField::setValue ( const UtcTimeStamp value)
inline

Definition at line 400 of file Field.h.

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

static std::string convert(const UtcTimeStamp &value, bool showMilliseconds=false)
void setString(const std::string &string)
Definition: Field.h:100

The documentation for this class 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