Main Page   Class Hierarchy   Compound List   File List   Compound Members  

C_ProtocolContext.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_PROTOCOLCONTEXT_
00021 #define _C_PROTOCOLCONTEXT_
00022 
00023 #include "Utils.hpp"
00024 #include "ProtocolDataType.hpp"
00025 #include "list_t.hpp"
00026 
00027 
00028 
00029 class C_ProtocolContext {
00030 
00031 public:
00032 
00033   typedef struct _struct_value {
00034     int            m_id_field     ;
00035     unsigned char *m_position_ptr ;
00036   } T_PositionValue, *T_pPositionValue ;
00037 
00038   typedef struct _struct_ctxt_value {
00039     T_ValueData       m_ctxt_value    ;
00040     T_PositionValue   m_ctxt_position ;
00041   } T_CtxtValue, *T_pCtxtValue ;
00042 
00043 
00044   C_ProtocolContext(int P_nb_values) ;
00045  
00046   ~C_ProtocolContext() ;
00047 
00048   void reset_ctxt_values(int P_index = 0) ;
00049   void update_ctxt_values(int P_id, int P_size) ;
00050   void update_ctxt_values(int P_nbCtx, int *P_idTable, int P_size) ;
00051 
00052   int  update_ctxt_values_decode(int P_nbCtx,
00053                                  int *P_idTable, 
00054                                  int P_size) ;
00055 
00056   void start_ctxt_value(int P_ctxt_id, int P_size) ;
00057 
00058   void update_ctxt_position(int P_id, T_pPositionValue P_position_value) ;
00059 
00060   unsigned long  get_counter_ctxt(int P_ctxt_id) ;
00061   
00062   bool end_counter_ctxt() ;
00063   
00064 
00065   bool          m_end_ctxt_counter ;
00066   
00067   int           m_nb_values        ;
00068   T_pCtxtValue  m_ctxt_val_table   ;
00069 
00070 
00071 private:
00072 
00073 
00074 } ; 
00075 
00076 #endif // _C_PROTOCOLCONTEXT_
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 

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