Public Member Functions | Private Types | List of all members
FIX::Header Class Reference

#include <Message.h>

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

Public Member Functions

 Header ()
 
 Header (const message_order &order)
 
void addGroup (const FIX::Group &group)
 
void replaceGroup (unsigned num, const FIX::Group &group)
 
GroupgetGroup (unsigned num, FIX::Group &group) const throw ( FieldNotFound )
 
void removeGroup (unsigned num, const FIX::Group &group)
 
void removeGroup (const FIX::Group &group)
 
bool hasGroup (const FIX::Group &group) const
 
bool hasGroup (unsigned num, const FIX::Group &group) const
 
- Public Member Functions inherited from FIX::FieldMap
 FieldMap (const message_order &order=message_order(message_order::normal))
 
 FieldMap (const int order[])
 
 FieldMap (const FieldMap &copy)
 
virtual ~FieldMap ()
 
FieldMapoperator= (const FieldMap &rhs)
 
void setField (const FieldBase &field, bool overwrite=true) throw ( RepeatedTag )
 Set a field without type checking. More...
 
void setField (int tag, const std::string &value) throw ( RepeatedTag, NoTagValue )
 Set a field without a field class. More...
 
bool getFieldIfSet (FieldBase &field) const
 Get a field if set. More...
 
FieldBasegetField (FieldBase &field) const throw ( FieldNotFound )
 Get a field without type checking. More...
 
const std::string & getField (int tag) const throw ( FieldNotFound )
 Get a field without a field class. More...
 
const FieldBasegetFieldRef (int tag) const throw ( FieldNotFound )
 Get direct access to a field through a reference. More...
 
const FieldBase *const getFieldPtr (int tag) const throw ( FieldNotFound )
 Get direct access to a field through a pointer. More...
 
bool isSetField (const FieldBase &field) const
 Check to see if a field is set. More...
 
bool isSetField (int tag) const
 Check to see if a field is set by referencing its number. More...
 
void removeField (int tag)
 Remove a field. If field is not present, this is a no-op. More...
 
void addGroup (int tag, const FieldMap &group, bool setCount=true)
 Add a group. More...
 
void addGroupPtr (int tag, FieldMap *group, bool setCount=true)
 Acquire ownership of Group object. More...
 
void replaceGroup (int num, int tag, const FieldMap &group)
 Replace a specific instance of a group. More...
 
FieldMapgetGroup (int num, int tag, FieldMap &group) const throw ( FieldNotFound )
 Get a specific instance of a group. More...
 
FieldMapgetGroupRef (int num, int tag) const throw ( FieldNotFound )
 Get direct access to a field through a reference. More...
 
FieldMapgetGroupPtr (int num, int tag) const throw ( FieldNotFound )
 Get direct access to a field through a pointer. More...
 
void removeGroup (int num, int tag)
 Remove a specific instance of a group. More...
 
void removeGroup (int tag)
 Remove all instances of a group. More...
 
bool hasGroup (int tag) const
 Check to see any instance of a group exists. More...
 
bool hasGroup (int num, int tag) const
 Check to see if a specific instance of a group exists. More...
 
size_t groupCount (int tag) const
 Count the number of instance of a group. More...
 
void clear ()
 Clear all fields from the map. More...
 
bool isEmpty ()
 Check if map contains any fields. More...
 
size_t totalFields () const
 
std::string & calculateString (std::string &) const
 
int calculateLength (int beginStringField=FIELD::BeginString, int bodyLengthField=FIELD::BodyLength, int checkSumField=FIELD::CheckSum) const
 
int calculateTotal (int checkSumField=FIELD::CheckSum) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
g_iterator g_begin ()
 
g_iterator g_end ()
 
g_const_iterator g_begin () const
 
g_const_iterator g_end () const
 

Private Types

enum  { REQUIRED_FIELDS = 8 }
 

Additional Inherited Members

- Public Types inherited from FIX::FieldMap
typedef std::vector< FieldBase, ALLOCATOR< FieldBase > > Fields
 
typedef std::map< int, std::vector< FieldMap * >, std::less< int >, ALLOCATOR< std::pair< const int, std::vector< FieldMap * > > > > Groups
 
typedef Fields::iterator iterator
 
typedef Fields::const_iterator const_iterator
 
typedef Groups::iterator g_iterator
 
typedef Groups::const_iterator g_const_iterator
 
- Protected Member Functions inherited from FIX::FieldMap
 FieldMap (const message_order &order, int size)
 
void addField (const FieldBase &field)
 
const FieldBasereverse_find (int tag) const
 
void appendField (const FieldBase &field)
 
void sortFields ()
 

Detailed Description

Definition at line 58 of file Message.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
REQUIRED_FIELDS 

Definition at line 77 of file Message.h.

77 {

Constructor & Destructor Documentation

◆ Header() [1/2]

FIX::Header::Header ( )
inline

Definition at line 80 of file Message.h.

80  :
81  Trailer() : FieldMap( message_order( message_order::trailer ), REQUIRED_FIELDS )

◆ Header() [2/2]

FIX::Header::Header ( const message_order order)
inline

Definition at line 83 of file Message.h.

84  : FieldMap(order)

Member Function Documentation

◆ addGroup()

void FIX::Header::addGroup ( const FIX::Group group)
inline

Definition at line 86 of file Message.h.

88  { FieldMap::addGroup( group.field(), group ); }

References FIX::FieldMap::addGroup(), and FIX::Group::field().

◆ getGroup()

Group& FIX::Header::getGroup ( unsigned  num,
FIX::Group group 
) const
throw (FieldNotFound
)
inline

Definition at line 92 of file Message.h.

94  { group.clear();
95  return static_cast < Group& >
96  ( FieldMap::getGroup( num, group.field(), group ) );

◆ hasGroup() [1/2]

bool FIX::Header::hasGroup ( const FIX::Group group) const
inline

Definition at line 103 of file Message.h.

105  { return FieldMap::hasGroup( group.field() ); }

◆ hasGroup() [2/2]

bool FIX::Header::hasGroup ( unsigned  num,
const FIX::Group group 
) const
inline

Definition at line 105 of file Message.h.

105  { return FieldMap::hasGroup( group.field() ); }
106  bool hasGroup( unsigned num, const FIX::Group& group ) const

References FIX::Group::field(), and FIX::FieldMap::hasGroup().

◆ removeGroup() [1/2]

void FIX::Header::removeGroup ( const FIX::Group group)
inline

Definition at line 100 of file Message.h.

100  { FieldMap::removeGroup( num, group.field() ); }
101  void removeGroup( const FIX::Group& group )

References FIX::Group::field(), and FIX::FieldMap::removeGroup().

◆ removeGroup() [2/2]

void FIX::Header::removeGroup ( unsigned  num,
const FIX::Group group 
)
inline

Definition at line 98 of file Message.h.

100  { FieldMap::removeGroup( num, group.field() ); }

◆ replaceGroup()

void FIX::Header::replaceGroup ( unsigned  num,
const FIX::Group group 
)
inline

Definition at line 89 of file Message.h.

91  { FieldMap::replaceGroup( num, group.field(), group ); }

References FIX::Group::field(), and FIX::FieldMap::replaceGroup().


The documentation for this class was generated from the following file:
FIX::FieldMap::hasGroup
bool hasGroup(int tag) const
Check to see any instance of a group exists.
Definition: FieldMap.cpp:185
FIX::FieldMap::clear
void clear()
Clear all fields from the map.
Definition: FieldMap.cpp:199
FIX::FieldMap::FieldMap
FieldMap(const message_order &order, int size)
Definition: FieldMap.cpp:51
FIX::Group::field
int field() const
Definition: Group.h:90
FIX::FieldMap::getGroup
FieldMap & getGroup(int num, int tag, FieldMap &group) const
Get a specific instance of a group.
Definition: FieldMap.h:241
FIX::FieldMap::replaceGroup
void replaceGroup(int num, int tag, const FieldMap &group)
Replace a specific instance of a group.
Definition: FieldMap.cpp:119
FIX::Header::REQUIRED_FIELDS
@ REQUIRED_FIELDS
Definition: Message.h:94
FIX::Header::hasGroup
bool hasGroup(const FIX::Group &group) const
Definition: Message.h:103
FIX::Group
Base class for all FIX repeating groups.
Definition: Group.h:57
FIX::FieldMap::addGroup
void addGroup(int tag, const FieldMap &group, bool setCount=true)
Add a group.
Definition: FieldMap.cpp:100
FIX::FieldMap::removeGroup
void removeGroup(int num, int tag)
Remove a specific instance of a group.
Definition: FieldMap.cpp:128
FIX::Header::removeGroup
void removeGroup(unsigned num, const FIX::Group &group)
Definition: Message.h:98

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