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

MSC doesn't support partial template specialization so we have this. More...

#include <Field.h>

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

Public Member Functions

 StringField (int field, const std::string &data)
 
 StringField (int field)
 
void setValue (const std::string &value)
 
const std::string & getValue () const
 
 operator const std::string & () const
 
bool operator< (const StringField &rhs) const
 
bool operator> (const StringField &rhs) const
 
bool operator== (const StringField &rhs) const
 
bool operator!= (const StringField &rhs) const
 
bool operator<= (const StringField &rhs) const
 
bool operator>= (const StringField &rhs) 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...
 

Friends

bool operator< (const StringField &, const char *)
 
bool operator< (const char *, const StringField &)
 
bool operator> (const StringField &, const char *)
 
bool operator> (const char *, const StringField &)
 
bool operator== (const StringField &, const char *)
 
bool operator== (const char *, const StringField &)
 
bool operator!= (const StringField &, const char *)
 
bool operator!= (const char *, const StringField &)
 
bool operator<= (const StringField &, const char *)
 
bool operator<= (const char *, const StringField &)
 
bool operator>= (const StringField &, const char *)
 
bool operator>= (const char *, const StringField &)
 
bool operator< (const StringField &, const std::string &)
 
bool operator< (const std::string &, const StringField &)
 
bool operator> (const StringField &, const std::string &)
 
bool operator> (const std::string &, const StringField &)
 
bool operator== (const StringField &, const std::string &)
 
bool operator== (const std::string &, const StringField &)
 
bool operator!= (const StringField &, const std::string &)
 
bool operator!= (const std::string &, const StringField &)
 
bool operator<= (const StringField &, const std::string &)
 
bool operator<= (const std::string &, const StringField &)
 
bool operator>= (const StringField &, const std::string &)
 
bool operator>= (const std::string &, const StringField &)
 

Detailed Description

MSC doesn't support partial template specialization so we have this.

this is here to provide equality checking against native char arrays.

Definition at line 275 of file Field.h.

Constructor & Destructor Documentation

◆ StringField() [1/2]

FIX::StringField::StringField ( int  field,
const std::string &  data 
)
inlineexplicit

Definition at line 278 of file Field.h.

278  { return getString() == rhs.getString(); }
279  bool operator!=( const StringField& rhs ) const

References FIX::FieldBase::getString().

◆ StringField() [2/2]

FIX::StringField::StringField ( int  field)
inline

Definition at line 280 of file Field.h.

280  { return getString() != rhs.getString(); }
281  bool operator<=( const StringField& rhs ) const

References FIX::FieldBase::getString().

Member Function Documentation

◆ getValue()

const std::string& FIX::StringField::getValue ( ) const
inline

Definition at line 285 of file Field.h.

◆ operator const std::string &()

FIX::StringField::operator const std::string & ( ) const
inline

Definition at line 287 of file Field.h.

◆ operator!=()

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

Definition at line 296 of file Field.h.

◆ operator<()

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

Definition at line 290 of file Field.h.

◆ operator<=()

bool FIX::StringField::operator<= ( const StringField rhs) const
inline

Definition at line 298 of file Field.h.

◆ operator==()

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

Definition at line 294 of file Field.h.

◆ operator>()

bool FIX::StringField::operator> ( const StringField rhs) const
inline

Definition at line 292 of file Field.h.

◆ operator>=()

bool FIX::StringField::operator>= ( const StringField rhs) const
inline

Definition at line 300 of file Field.h.

◆ setValue()

void FIX::StringField::setValue ( const std::string &  value)
inline

Definition at line 283 of file Field.h.

284  { return getString() >= rhs.getString(); }

References FIX::FieldBase::getString().

Friends And Related Function Documentation

◆ operator!= [1/4]

bool operator!= ( const char *  lhs,
const StringField rhs 
)
friend

Definition at line 343 of file Field.h.

344  { return lhs > rhs.getValue(); }

◆ operator!= [2/4]

bool operator!= ( const std::string &  lhs,
const StringField rhs 
)
friend

Definition at line 368 of file Field.h.

369 : FieldBase( field, "" ) {}

◆ operator!= [3/4]

bool operator!= ( const StringField lhs,
const char *  rhs 
)
friend

Definition at line 341 of file Field.h.

342  { return lhs.getValue() > rhs; }

◆ operator!= [4/4]

bool operator!= ( const StringField lhs,
const std::string &  rhs 
)
friend

Definition at line 366 of file Field.h.

367 : FieldBase( field, CharConvertor::convert( data ) ) {}

◆ operator< [1/4]

bool operator< ( const char *  lhs,
const StringField rhs 
)
friend

Definition at line 331 of file Field.h.

331  { return lhs <= rhs.getValue(); }
332 inline bool operator>=( const StringField& lhs, const char* rhs )

◆ operator< [2/4]

bool operator< ( const std::string &  lhs,
const StringField rhs 
)
friend

Definition at line 356 of file Field.h.

356  { return lhs <= rhs.getValue(); }
357 inline bool operator>=( const StringField& lhs, const std::string& rhs )

◆ operator< [3/4]

bool operator< ( const StringField lhs,
const char *  rhs 
)
friend

Definition at line 329 of file Field.h.

329  { return lhs.getValue() <= rhs; }
330 inline bool operator<=( const char* lhs, const StringField& rhs )

◆ operator< [4/4]

bool operator< ( const StringField lhs,
const std::string &  rhs 
)
friend

Definition at line 354 of file Field.h.

354  { return lhs.getValue() <= rhs; }
355 inline bool operator<=( const std::string& lhs, const StringField& rhs )

◆ operator<= [1/4]

bool operator<= ( const char *  lhs,
const StringField rhs 
)
friend

Definition at line 347 of file Field.h.

348  { return lhs == rhs.getValue(); }

◆ operator<= [2/4]

bool operator<= ( const std::string &  lhs,
const StringField rhs 
)
friend

Definition at line 372 of file Field.h.

372  { setString( CharConvertor::convert( value ) ); }
373  char getValue() const throw ( IncorrectDataFormat )

◆ operator<= [3/4]

bool operator<= ( const StringField lhs,
const char *  rhs 
)
friend

Definition at line 345 of file Field.h.

346  { return lhs.getValue() == rhs; }

◆ operator<= [4/4]

bool operator<= ( const StringField lhs,
const std::string &  rhs 
)
friend

Definition at line 370 of file Field.h.

372  { setString( CharConvertor::convert( value ) ); }

◆ operator== [1/4]

bool operator== ( const char *  lhs,
const StringField rhs 
)
friend

Definition at line 339 of file Field.h.

340  { return lhs < rhs.getValue(); }

◆ operator== [2/4]

bool operator== ( const std::string &  lhs,
const StringField rhs 
)
friend

Definition at line 364 of file Field.h.

364 {
365 public:

◆ operator== [3/4]

bool operator== ( const StringField lhs,
const char *  rhs 
)
friend

Definition at line 337 of file Field.h.

338  { return lhs.getValue() < rhs; }

◆ operator== [4/4]

bool operator== ( const StringField lhs,
const std::string &  rhs 
)
friend

Definition at line 362 of file Field.h.

363  : public FieldBase

◆ operator> [1/4]

bool operator> ( const char *  lhs,
const StringField rhs 
)
friend

Definition at line 335 of file Field.h.

335  { return lhs >= rhs.getValue(); }
336 

◆ operator> [2/4]

bool operator> ( const std::string &  lhs,
const StringField rhs 
)
friend

Definition at line 360 of file Field.h.

360  { return lhs >= rhs.getValue(); }
361 

◆ operator> [3/4]

bool operator> ( const StringField lhs,
const char *  rhs 
)
friend

Definition at line 333 of file Field.h.

333  { return lhs.getValue() >= rhs; }
334 inline bool operator>=( const char* lhs, const StringField& rhs )

◆ operator> [4/4]

bool operator> ( const StringField lhs,
const std::string &  rhs 
)
friend

Definition at line 358 of file Field.h.

358  { return lhs.getValue() >= rhs; }
359 inline bool operator>=( const std::string& lhs, const StringField& rhs )

◆ operator>= [1/4]

bool operator>= ( const char *  lhs,
const StringField rhs 
)
friend

Definition at line 351 of file Field.h.

352  { return lhs != rhs.getValue(); }

◆ operator>= [2/4]

bool operator>= ( const std::string &  lhs,
const StringField rhs 
)
friend

Definition at line 376 of file Field.h.

377  { throw IncorrectDataFormat( getTag(), getString() ); } }

◆ operator>= [3/4]

bool operator>= ( const StringField lhs,
const char *  rhs 
)
friend

Definition at line 349 of file Field.h.

350  { return lhs.getValue() != rhs; }

◆ operator>= [4/4]

bool operator>= ( const StringField lhs,
const std::string &  rhs 
)
friend

Definition at line 374 of file Field.h.

374  { try
375  { return CharConvertor::convert( getString() ); }

The documentation for this class was generated from the following file:
FIX::StringField::operator!=
bool operator!=(const StringField &rhs) const
Definition: Field.h:296
FIX::CharConvertor::convert
static std::string convert(char value)
Definition: FieldConvertors.h:391
FIX::StringField::getValue
const std::string & getValue() const
Definition: Field.h:285
FIX::FieldBase::getTag
int getTag() const
Get the fields integer tag.
Definition: Field.h:178
FIX::FieldBase::setString
void setString(const std::string &string)
Definition: Field.h:170
FIX::StringField::operator<=
bool operator<=(const StringField &rhs) const
Definition: Field.h:298
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::StringField::operator>=
bool operator>=(const StringField &rhs) const
Definition: Field.h:300
FIX::FieldBase::getString
const std::string & getString() const
Get the string representation of the fields value.
Definition: Field.h:186
FIX::StringField::StringField
StringField(int field, const std::string &data)
Definition: Field.h:278

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