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
Fields.h
FIX::Group::replaceGroup
void replaceGroup(unsigned num, const Group &group)
Definition: Group.cpp:52
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::Group::delim
int delim() const
Definition: Group.h:91
FIX::Group::addGroup
void addGroup(const Group &group)
Definition: Group.cpp:47
FIX::Group::m_delim
int m_delim
Definition: Group.h:103
FIX::Group::Group
Group(int field, int delim)
Definition: Group.h:77
FieldMap.h
FIX::FieldNotFound
Field not found inside a message.
Definition: Exceptions.h:74
FIX
Definition: Acceptor.cpp:34
FIX::Group::hasGroup
bool hasGroup(const Group &group)
Definition: Group.cpp:77
FIX::Group::removeGroup
void removeGroup(unsigned num, const Group &group)
Definition: Group.cpp:62
FIX::Group
Base class for all FIX repeating groups.
Definition: Group.h:57
FIX::Group::getGroup
Group & getGroup(unsigned num, Group &group) const
Definition: Group.cpp:57
FIX::Group::m_field
int m_field
Definition: Group.h:102

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