QuickFIX: /home/omiller/Development/autobuild/quickfix/src/C++/Group.h Source File

Index Source Files Annotated Class List Alphabetical Class List Class Hierarchy Graphical Class Hierarchy

# Group.h

Go to the documentation of this file.

    00001 /* -*- C++ -*- */
    00002
    00003 /****************************************************************************
    00004 ** Copyright (c) quickfixengine.org  All rights reserved.
    00005 **
    00006 ** This file is part of the QuickFIX FIX Engine
    00007 **
    00008 ** This file may be distributed under the terms of the quickfixengine.org
    00009 ** license as defined by quickfixengine.org and appearing in the file
    00010 ** LICENSE included in the packaging of this file.
    00011 **
    00012 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
    00013 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    00014 **
    00015 ** See http://www.quickfixengine.org/LICENSE for licensing information.
    00016 **
    00017 ** Contact ask@quickfixengine.org if any conditions of this licensing are
    00018 ** not clear to you.
    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