Group.h
Go to the documentation of this file.
1/* -*- C++ -*- */
2
3/****************************************************************************
4** Copyright (c) 2001-2014
5**
6** This file is part of the QuickFIX FIX Engine
7**
8** This file may be distributed under the terms of the quickfixengine.org
9** license as defined by quickfixengine.org and appearing in the file
10** LICENSE included in the packaging of this file.
11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14**
15** See http://www.quickfixengine.org/LICENSE for licensing information.
16**
17** Contact ask@quickfixengine.org if any conditions of this licensing are
18** not clear to you.
19**
20****************************************************************************/
21
22#ifndef FIX_GROUP
23#define FIX_GROUP
24
25#ifdef _MSC_VER
26#pragma warning( disable: 4786 )
27#endif
28
29#include "FieldMap.h"
30#include "Fields.h"
31#include <vector>
32
33namespace FIX
34{
40class Group : public FieldMap
41{
42public:
43 Group( int field, int delim )
44 : FieldMap( message_order( delim, 0 ) ),
45 m_field( field ), m_delim( delim ) {}
46
47 Group( int field, int delim, const int order[] )
48 : FieldMap( order ), m_field( field ), m_delim( delim ) {}
49
50 Group( int field, int delim, const message_order& order )
51 : FieldMap( order ), m_field( field ), m_delim( delim ) {}
52
53 Group( const Group& copy )
54 : FieldMap( copy ), m_field( copy.m_field ), m_delim( copy.m_delim ) {}
55
56 int field() const { return m_field; }
57 int delim() const { return m_delim; }
58
59 void addGroup( const Group& group );
60 void replaceGroup( unsigned num, const Group& group );
61 Group& getGroup( unsigned num, Group& group ) const throw( FieldNotFound );
62 void removeGroup( unsigned num, const Group& group );
63 void removeGroup( const Group& group );
64 bool hasGroup( const Group& group );
65 bool hasGroup( unsigned num, const Group& group );
66
67private:
70};
71}
72
73#endif //FIX_GROUP
Stores and organizes a collection of Fields.
Definition FieldMap.h:47
Base class for all FIX repeating groups.
Definition Group.h:41
void replaceGroup(unsigned num, const Group &group)
Definition Group.cpp:35
int delim() const
Definition Group.h:57
void addGroup(const Group &group)
Definition Group.cpp:30
int m_delim
Definition Group.h:69
int m_field
Definition Group.h:68
Group(int field, int delim, const message_order &order)
Definition Group.h:50
void removeGroup(unsigned num, const Group &group)
Definition Group.cpp:45
Group(int field, int delim)
Definition Group.h:43
Group & getGroup(unsigned num, Group &group) const
Definition Group.cpp:40
Group(const Group &copy)
Definition Group.h:53
bool hasGroup(const Group &group)
Definition Group.cpp:60
int field() const
Definition Group.h:56
Group(int field, int delim, const int order[])
Definition Group.h:47
Field not found inside a message.
Definition Exceptions.h:58
Sorts fields in header, normal, or trailer order.

Generated on Thu May 22 2025 08:23:50 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001