Main Page   Class Hierarchy   Compound List   File List   Compound Members  

C_MessageFrame.hpp

00001 /*
00002  *  This program is free software; you can redistribute it and/or modify
00003  *  it under the terms of the GNU General Public License as published by
00004  *  the Free Software Foundation; either version 2 of the License, or
00005  *  (at your option) any later version.
00006  *
00007  *  This program is distributed in the hope that it will be useful,
00008  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010  *  GNU General Public License for more details.
00011  *
00012  *  You should have received a copy of the GNU General Public License
00013  *  along with this program; if not, write to the Free Software
00014  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00015  *
00016  * (c)Copyright 2006 Hewlett-Packard Development Company, LP.
00017  *
00018  */
00019 
00020 #ifndef    _C_MESSAGEFRAME_H
00021 #define    _C_MESSAGEFRAME_H
00022 
00023 #include "message_check_t.h"
00024 #include "iostream_t.hpp"
00025 
00026 #include "list_t.hpp"
00027 #include "ProtocolDataType.hpp"
00028 #include "ProtocolStats.hpp"
00029 #include "C_ContextFrame.hpp"
00030 
00031 #include "C_RegExp.hpp"
00032 #include "message_header_body_t.h"
00033 
00034 class C_MessageFrame { // Message Definition Class
00035 
00036 public:
00037 
00038            C_MessageFrame() {} ;
00039   virtual ~C_MessageFrame() {} ;
00040 
00041   virtual T_pValueData get_session_id (C_ContextFrame *P_ctxt) = 0 ;
00042 
00043   virtual bool         compare_types (C_MessageFrame *P_ref) = 0 ;
00044   virtual bool         update_fields (C_MessageFrame *P_ref) = 0 ;
00045 
00046   virtual void         update_message_stats () = 0 ;
00047 
00048   virtual bool         check         (C_MessageFrame  *P_ref, 
00049                                       unsigned int     P_levelMask,
00050                                       T_CheckBehaviour P_behave) = 0 ;
00051   virtual bool         check_field_presence (int              P_id,
00052                                              T_CheckBehaviour P_behave,
00053                                              int P_instance,
00054                                              int P_sub_id) = 0 ;
00055   
00056   virtual bool         check_field_value (C_MessageFrame  *P_ref,
00057                                           int              P_id,
00058                                           T_CheckBehaviour P_behave,
00059                                           int P_instance,
00060                                           int P_sub_id) = 0 ;
00061 
00062   virtual bool         check_field_order (int              P_id,
00063                                           T_CheckBehaviour P_behave,
00064                                           int              P_position) = 0 ;
00065 
00066 
00067   virtual T_TypeType   get_field_type  (int P_id,
00068                                         int P_sub_id)           = 0 ;
00069 
00070   virtual bool         get_field_value (int P_id, 
00071                                         C_RegExp * P_reg,
00072                                         T_pValueData P_value) = 0 ;
00073 
00074 
00075   virtual bool         get_field_value (int P_id, 
00076                                         int P_instance,
00077                                         int P_sub_id,
00078                                         T_pValueData P_value) = 0 ;
00079 
00080   virtual int         get_buffer (T_pValueData P_dest,
00081                                   T_MessagePartType P_header_body_type) = 0 ;
00082 
00083   virtual bool         set_field_value (T_pValueData P_value, 
00084                                         int P_id,
00085                                         int P_instance,
00086                                         int P_sub_id) = 0 ;
00087   virtual void         dump(iostream_output&) = 0 ;
00088   virtual char*        name() = 0 ;
00089 
00090   virtual int          get_id_message() = 0 ;
00091 
00092 
00093 
00094   friend iostream_output& operator<< 
00095   (iostream_output& P_stream, C_MessageFrame & P_msg) {P_msg.dump(P_stream); 
00096   return(P_stream);} ;
00097 
00098 protected:
00099 private:
00100 
00101 } ;
00102 
00103 
00104 
00105 typedef C_MessageFrame *T_pC_MessageFrame ;
00106 typedef list_t<T_pC_MessageFrame>  T_MessageFrameList,
00107                                   *T_pMessageFrameList ;
00108 
00109 
00110 #endif  // _C_MESSAGEFRAME_H
00111 

Generated on Wed Mar 7 14:44:50 2007 for Seagull by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002