Public Member Functions | Private Attributes | List of all members
FIX::Group Class Reference

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

#include <Group.h>

Inheritance diagram for FIX::Group:
Inheritance graph
[legend]
Collaboration diagram for FIX::Group:
Collaboration graph
[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)
 
GroupgetGroup (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 ()
 
FieldMapoperator= (const FieldMap &rhs)
 
void setField (const FieldBase &field, bool overwrite=true) throw ( RepeatedTag )
 Set a field without type checking. More...
 
void setField (int field, 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 field) const throw ( FieldNotFound )
 Get a field without a field class. More...
 
const FieldBasegetFieldRef (int field) const throw ( FieldNotFound )
 Get direct access to a field through a reference. More...
 
const FieldBase *const getFieldPtr (int field) 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 field) const
 Check to see if a field is set by referencing its number. More...
 
void removeField (int field)
 Remove a field. If field is not present, this is a no-op. More...
 
void addGroup (int field, const FieldMap &group, bool setCount=true)
 Add a group. More...
 
void addGroupPtr (int field, FieldMap *group, bool setCount=true)
 Acquire ownership of Group object. More...
 
void replaceGroup (int num, int field, const FieldMap &group)
 Replace a specific instance of a group. More...
 
FieldMapgetGroup (int num, int field, FieldMap &group) const throw ( FieldNotFound )
 Get a specific instance of a group. More...
 
FieldMapgetGroupRef (int num, int field) const throw ( FieldNotFound )
 Get direct access to a field through a reference. More...
 
FieldMapgetGroupPtr (int num, int field) const throw ( FieldNotFound )
 Get direct access to a field through a pointer. More...
 
void removeGroup (int num, int field)
 Remove a specific instance of a group. More...
 
void removeGroup (int field)
 Remove all instances of a group. More...
 
bool hasGroup (int field) const
 Check to see any instance of a group exists. More...
 
bool hasGroup (int num, int field) const
 Check to see if a specific instance of a group exists. More...
 
int groupCount (int field) 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...
 
int totalFields () const
 
std::string & calculateString (std::string &, bool clear=true) 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 () const
 
iterator end () const
 
g_iterator g_begin () const
 
g_iterator g_end () const
 

Private Attributes

int m_field
 
int m_delim
 

Additional Inherited Members

- Public Types inherited from FIX::FieldMap
typedef std::multimap< int,
FieldBase, message_order,
ALLOCATOR< std::pair< const
int, FieldBase > > > 
Fields
 
typedef std::map< int,
std::vector< FieldMap * >
, std::less< int >, ALLOCATOR
< std::pair< const int,
std::vector< FieldMap * > > > > 
Groups
 
typedef Fields::const_iterator iterator
 
typedef iterator const_iterator
 
typedef Groups::const_iterator g_iterator
 
typedef Groups::const_iterator g_const_iterator
 

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

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

Definition at line 43 of file Group.h.

44  : FieldMap( message_order( delim, 0 ) ),
45  m_field( field ), m_delim( delim ) {}
int m_delim
Definition: Group.h:69
int m_field
Definition: Group.h:68
int field() const
Definition: Group.h:56
FieldMap(const message_order &order=message_order(message_order::normal))
Definition: FieldMap.h:64
int delim() const
Definition: Group.h:57
FIX::Group::Group ( int  field,
int  delim,
const int  order[] 
)
inline

Definition at line 47 of file Group.h.

48  : FieldMap( order ), m_field( field ), m_delim( delim ) {}
int m_delim
Definition: Group.h:69
int m_field
Definition: Group.h:68
int field() const
Definition: Group.h:56
FieldMap(const message_order &order=message_order(message_order::normal))
Definition: FieldMap.h:64
int delim() const
Definition: Group.h:57
FIX::Group::Group ( int  field,
int  delim,
const message_order order 
)
inline

Definition at line 50 of file Group.h.

51  : FieldMap( order ), m_field( field ), m_delim( delim ) {}
int m_delim
Definition: Group.h:69
int m_field
Definition: Group.h:68
int field() const
Definition: Group.h:56
FieldMap(const message_order &order=message_order(message_order::normal))
Definition: FieldMap.h:64
int delim() const
Definition: Group.h:57
FIX::Group::Group ( const Group copy)
inline

Definition at line 53 of file Group.h.

54  : FieldMap( copy ), m_field( copy.m_field ), m_delim( copy.m_delim ) {}
int m_delim
Definition: Group.h:69
int m_field
Definition: Group.h:68
FieldMap(const message_order &order=message_order(message_order::normal))
Definition: FieldMap.h:64

Member Function Documentation

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

Definition at line 30 of file Group.cpp.

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

31 {
32  FieldMap::addGroup( group.field(), group );
33 }
void addGroup(int field, const FieldMap &group, bool setCount=true)
Add a group.
Definition: FieldMap.cpp:58
int FIX::Group::delim ( ) const
inline

Definition at line 57 of file Group.h.

References m_delim.

57 { return m_delim; }
int m_delim
Definition: Group.h:69
int FIX::Group::field ( ) const
inline
Group & FIX::Group::getGroup ( unsigned  num,
Group group 
) const
throw (FieldNotFound
)

Definition at line 40 of file Group.cpp.

References FIX::FieldMap::getGroup().

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

Definition at line 60 of file Group.cpp.

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

61 {
62  return FieldMap::hasGroup( group.field() );
63 }
bool hasGroup(int field) const
Check to see any instance of a group exists.
Definition: FieldMap.cpp:129
bool FIX::Group::hasGroup ( unsigned  num,
const Group group 
)

Definition at line 55 of file Group.cpp.

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

56 {
57  return FieldMap::hasGroup( num, group.field() );
58 }
bool hasGroup(int field) const
Check to see any instance of a group exists.
Definition: FieldMap.cpp:129
void FIX::Group::removeGroup ( unsigned  num,
const Group group 
)

Definition at line 45 of file Group.cpp.

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

46 {
47  FieldMap::removeGroup( num, group.field() );
48 }
void removeGroup(int num, int field)
Remove a specific instance of a group.
Definition: FieldMap.cpp:86
void FIX::Group::removeGroup ( const Group group)

Definition at line 50 of file Group.cpp.

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

51 {
52  FieldMap::removeGroup( group.field() );
53 }
void removeGroup(int num, int field)
Remove a specific instance of a group.
Definition: FieldMap.cpp:86
void FIX::Group::replaceGroup ( unsigned  num,
const Group group 
)

Definition at line 35 of file Group.cpp.

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

36 {
37  FieldMap::replaceGroup( num, group.field(), group );
38 }
void replaceGroup(int num, int field, const FieldMap &group)
Replace a specific instance of a group.
Definition: FieldMap.cpp:77

Member Data Documentation

int FIX::Group::m_delim
private

Definition at line 69 of file Group.h.

Referenced by delim().

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:

Generated on Sat Mar 29 2014 15:13:34 for QuickFIX by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2001