Group.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FIX_GROUP
00023 #define FIX_GROUP
00024
00025 #ifdef _MSC_VER
00026 #pragma warning( disable: 4786 )
00027 #endif
00028
00029 #include "FieldMap.h"
00030 #include "Fields.h"
00031 #include <vector>
00032
00033 namespace FIX
00034 {
00040 class Group : public FieldMap
00041 {
00042 public:
00043 Group( int field, int delim )
00044 : FieldMap( message_order( delim, 0 ) ),
00045 m_field( field ), m_delim( delim ) {}
00046
00047 Group( int field, int delim, const int order[] )
00048 : FieldMap( order ), m_field( field ), m_delim( delim ) {}
00049
00050 Group( int field, int delim, const message_order& order )
00051 : FieldMap( order ), m_field( field ), m_delim( delim ) {}
00052
00053 Group( const Group& copy )
00054 : FieldMap( copy ), m_field( copy.m_field ), m_delim( copy.m_delim ) {}
00055
00056 int field() const { return m_field; }
00057 int delim() const { return m_delim; }
00058
00059 void addGroup( Group& group );
00060 void replaceGroup( unsigned num, Group& group );
00061 Group& getGroup( unsigned num, Group& group ) const throw( FieldNotFound );
00062 void removeGroup( unsigned num, Group& group );
00063 void removeGroup( Group& group );
00064 bool hasGroup( const Group& group );
00065 bool hasGroup( unsigned num, Group& group );
00066
00067 private:
00068 int m_field;
00069 int m_delim;
00070 };
00071 }
00072
00073 #endif //FIX_GROUP