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 
33 namespace FIX
34 {
40 class Group : public FieldMap
41 {
42 public:
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 
67 private:
68  int m_field;
69  int m_delim;
70 };
71 }
72 
73 #endif //FIX_GROUP
Group(const Group &copy)
Definition: Group.h:53
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
int field() const
Definition: Group.h:56
Definition: Acceptor.cpp:34
bool hasGroup(const Group &group)
Definition: Group.cpp:60
void replaceGroup(unsigned num, const Group &group)
Definition: Group.cpp:35
Base class for all FIX repeating groups.
Definition: Group.h:40
Stores and organizes a collection of Fields.
Definition: FieldMap.h:46
int delim() const
Definition: Group.h:57
Group & getGroup(unsigned num, Group &group) const
Definition: Group.cpp:40
Field not found inside a message.
Definition: Exceptions.h:57
void addGroup(const Group &group)
Definition: Group.cpp:30
Sorts fields in header, normal, or trailer order.
Group(int field, int delim, const int order[])
Definition: Group.h:47
Group(int field, int delim)
Definition: Group.h:43
void removeGroup(unsigned num, const Group &group)
Definition: Group.cpp:45

Generated on Thu Sep 5 2019 11:07:58 for QuickFIX by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001