FIX::Group Class Reference

Base class for all FIX repeating groups. More...

`#include <Group.h>`

Inheritance diagram for FIX::Group:
[legend]
Collaboration diagram for FIX::Group:
[legend]

## Public Member Functions

| Group (int field, int delim)
| Group (int field, int delim, const int order[])
| Group (int field, int delim, const message_order &order)
| Group (const Group &copy)
int | field () const
int | delim () const
void | addGroup (const Group &group)
void | replaceGroup (unsigned num, const Group &group)
Group & | getGroup (unsigned num, Group &group) const throw ( FieldNotFound )
void | removeGroup (unsigned num, const Group &group)
void | removeGroup (const Group &group)
bool | hasGroup (const Group &group)
bool | hasGroup (unsigned num, const Group &group)
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 ()
FieldMap & | operator= (const FieldMap &rhs)
void | setField (const FieldBase &field, bool overwrite=true) throw ( RepeatedTag )
| Set a field without type checking.
void | setField (int tag, const std::string &value) throw ( RepeatedTag, NoTagValue )
| Set a field without a field class.
bool | getFieldIfSet (FieldBase &field) const
| Get a field if set.
FieldBase & | getField (FieldBase &field) const throw ( FieldNotFound )
| Get a field without type checking.
const std::string & | getField (int tag) const throw ( FieldNotFound )
| Get a field without a field class.
const FieldBase & | getFieldRef (int tag) const throw ( FieldNotFound )
| Get direct access to a field through a reference.
const FieldBase *const | getFieldPtr (int tag) const throw ( FieldNotFound )
| Get direct access to a field through a pointer.
bool | isSetField (const FieldBase &field) const
| Check to see if a field is set.
bool | isSetField (int tag) const
| Check to see if a field is set by referencing its number.
void | removeField (int tag)
| Remove a field. If field is not present, this is a no-op.
void | addGroup (int tag, const FieldMap &group, bool setCount=true)
| Add a group.
void | addGroupPtr (int tag, FieldMap *group, bool setCount=true)
| Acquire ownership of Group object.
void | replaceGroup (int num, int tag, const FieldMap &group)
| Replace a specific instance of a group.
FieldMap & | getGroup (int num, int tag, FieldMap &group) const throw ( FieldNotFound )
| Get a specific instance of a group.
FieldMap & | getGroupRef (int num, int tag) const throw ( FieldNotFound )
| Get direct access to a field through a reference.
FieldMap * | getGroupPtr (int num, int tag) const throw ( FieldNotFound )
| Get direct access to a field through a pointer.
void | removeGroup (int num, int tag)
| Remove a specific instance of a group.
void | removeGroup (int tag)
| Remove all instances of a group.
bool | hasGroup (int tag) const
| Check to see any instance of a group exists.
bool | hasGroup (int num, int tag) const
| Check to see if a specific instance of a group exists.
size_t | groupCount (int tag) const
| Count the number of instance of a group.
void | clear ()
| Clear all fields from the map.
bool | isEmpty ()
| Check if map contains any fields.
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 Attributes

int | m_field
int | m_delim

## 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 FieldBase & | reverse_find (int tag) const
void | appendField (const FieldBase &field)
void | sortFields ()

## Detailed Description

Base class for all FIX repeating groups.

A group consists of a count field, deliminator, and a sorting order.

Definition at line 40 of file Group.h.

## Constructor & Destructor Documentation

## Group() [1/4]

FIX::Group::Group | ( | int | field,
|  | int | delim
| ) |  |

inline

Definition at line 43 of file Group.h.

: FieldMap( message_order( delim, 0 ) ),
m_field( field ), m_delim( delim ) {}
FIX::FieldMap::FieldMap
FieldMap(const message_order &order, int size)
Definition FieldMap.cpp:34
FIX::Group::delim
int delim() const
Definition Group.h:57
FIX::Group::m_delim
int m_delim
Definition Group.h:69
FIX::Group::m_field
int m_field
Definition Group.h:68
FIX::Group::field
int field() const
Definition Group.h:56

## Group() [2/4]

FIX::Group::Group | ( | int | field,
|  | int | delim,
|  | const int | order[]
| ) |  |

inline

Definition at line 47 of file Group.h.

: FieldMap( order ), m_field( field ), m_delim( delim ) {}

## Group() [3/4]

FIX::Group::Group | ( | int | field,
|  | int | delim,
|  | const message_order & | order
| ) |  |

inline

Definition at line 50 of file Group.h.

: FieldMap( order ), m_field( field ), m_delim( delim ) {}

## Group() [4/4]

FIX::Group::Group | ( | const Group & | copy | ) |

inline

Definition at line 53 of file Group.h.

: FieldMap( copy ), m_field( copy.m_field ), m_delim( copy.m_delim ) {}

## Member Function Documentation

## addGroup()

void FIX::Group::addGroup | ( | const Group & | group | ) |

Definition at line 30 of file Group.cpp.

{
FieldMap::addGroup( group.field(), group );
}
FIX::FieldMap::addGroup
void addGroup(int tag, const FieldMap &group, bool setCount=true)
Add a group.
Definition FieldMap.cpp:83

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

## delim()

int FIX::Group::delim | ( |  | ) | const

inline

Definition at line 57 of file Group.h.

{ return m_delim; }

References m_delim.

## field()

int FIX::Group::field | ( |  | ) | const

inline

Definition at line 56 of file Group.h.

{ return m_field; }

References m_field.

Referenced by FIX::Header::addGroup(), FIX::Trailer::addGroup(), addGroup(), FIX::Header::hasGroup(), FIX::Trailer::hasGroup(), FIX::Message::hasGroup(), hasGroup(), FIX::Header::hasGroup(), FIX::Trailer::hasGroup(), FIX::Message::hasGroup(), hasGroup(), FIX::Header::removeGroup(), FIX::Trailer::removeGroup(), FIX::Message::removeGroup(), removeGroup(), FIX::Header::removeGroup(), FIX::Trailer::removeGroup(), FIX::Message::removeGroup(), removeGroup(), FIX::Header::replaceGroup(), FIX::Trailer::replaceGroup(), FIX::Message::replaceGroup(), and replaceGroup().

## getGroup()

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

Definition at line 40 of file Group.cpp.

{
return static_cast < Group& > ( FieldMap::getGroup( num, group.field(), group ) );
}
FIX::FieldMap::getGroup
FieldMap & getGroup(int num, int tag, FieldMap &group) const
Get a specific instance of a group.
Definition FieldMap.h:207
FIX::Group::Group
Group(int field, int delim)
Definition Group.h:43

References FIX::FieldMap::getGroup().

## hasGroup() [1/2]

bool FIX::Group::hasGroup | ( | const Group & | group | ) |

Definition at line 60 of file Group.cpp.

{
return FieldMap::hasGroup( group.field() );
}
FIX::FieldMap::hasGroup
bool hasGroup(int tag) const
Check to see any instance of a group exists.
Definition FieldMap.cpp:168

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

## hasGroup() [2/2]

bool FIX::Group::hasGroup | ( | unsigned | num,
|  | const Group & | group
| ) |  |

Definition at line 55 of file Group.cpp.

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

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

## removeGroup() [1/2]

void FIX::Group::removeGroup | ( | const Group & | group | ) |

Definition at line 50 of file Group.cpp.

{
FieldMap::removeGroup( group.field() );
}
FIX::FieldMap::removeGroup
void removeGroup(int num, int tag)
Remove a specific instance of a group.
Definition FieldMap.cpp:111

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

## removeGroup() [2/2]

void FIX::Group::removeGroup | ( | unsigned | num,
|  | const Group & | group
| ) |  |

Definition at line 45 of file Group.cpp.

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

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

## replaceGroup()

void FIX::Group::replaceGroup | ( | unsigned | num,
|  | const Group & | group
| ) |  |

Definition at line 35 of file Group.cpp.

{
FieldMap::replaceGroup( num, group.field(), group );
}
FIX::FieldMap::replaceGroup
void replaceGroup(int num, int tag, const FieldMap &group)
Replace a specific instance of a group.
Definition FieldMap.cpp:102

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

## Member Data Documentation

## m_delim

int FIX::Group::m_delim

private

Definition at line 69 of file Group.h.

Referenced by delim().

## m_field

int FIX::Group::m_field

private

Definition at line 68 of file Group.h.

Referenced by field().

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

- Group.h
- Group.cpp