Main Page   Class Hierarchy   Compound List   File List   Compound Members  

C_DisplayControl.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_DISPLAYCONTROL_H
00021 #define _C_DISPLAYCONTROL_H
00022 
00023 #include "C_Semaphore.hpp"
00024 #include "C_SemaphoreTimed.hpp"
00025 #include "C_GeneratorStats.hpp"
00026 #include "C_TaskControl.hpp"
00027 #include "C_DisplayObject.hpp"
00028 #include "list_t.hpp"
00029 
00030 
00031 class C_DisplayControl : public C_TaskControl {
00032 
00033  public:
00034 
00035   C_DisplayControl() ;
00036   ~C_DisplayControl() ;
00037   
00038   void  init (long P_period);
00039   void  init_screens () ;
00040   void  set_screen (char P_key) ;
00041   void  set_sub_screen (int P_increment) ;
00042   void  set_max_sub_screen (int P_id, int P_max_sub_screen) ;
00043   void  pause () ;
00044 
00045   void  add_screen (C_DisplayObject *P_display, 
00046                     char P_key,
00047                     char *P_comment);
00048   void  add_help (char P_key,
00049                   char *P_comment);
00050   int  help_all_screens (int P_counter) ;
00051 
00052   void change_display_period (long P_period);
00053 
00054 private :
00055   
00056   C_GeneratorStats *m_stat;
00057   C_SemaphoreTimed *m_sem ;
00058 
00059   typedef struct _t_screen_data {
00060     C_DisplayObject *m_object ;
00061     char             m_key    ;
00062     char            *m_comment;
00063   } T_ScreenData, *T_pScreenData ;
00064   typedef list_t<T_ScreenData> T_ScreenDataList, *T_pScreenDataList ;
00065 
00066 
00067   typedef struct _t_screen_by_key {
00068     int             m_nb_screen       ;
00069     int             m_current_screen  ;
00070     C_DisplayObject **m_screen_object ;
00071     char            *m_comment        ;
00072   } T_ScreenByKey, *T_pScreenByKey ;
00073 
00074   T_pScreenByKey    m_screen_table ;
00075   C_DisplayObject  *m_current_display ;
00076 
00077   typedef struct _help_info {
00078     char m_key      ;
00079     char *m_comment ;
00080   } T_HelpInfo, *T_pHelpInfo ;
00081   T_pHelpInfo m_help_table      ;
00082   int         m_help_table_size ;
00083   
00084   typedef list_t<T_HelpInfo> T_HelpInfoList, 
00085     *T_pHelpInfoList ;          
00086 
00087   T_pHelpInfoList m_help_list ;
00088   
00089 
00090      
00091   T_pScreenDataList  m_screen_list ;
00092 
00093   int                m_current_screen  ;
00094 
00095   int               m_screen_id  ;
00096   int               m_previous_screen_id ;
00097   C_Semaphore      *m_sem_scr_id ; 
00098 
00099   bool              m_pause ;
00100   C_Semaphore      *m_sem_pause ;
00101   
00102   T_GeneratorError TaskProcedure () ;
00103   T_GeneratorError InitProcedure () ;
00104   T_GeneratorError EndProcedure () ;
00105   T_GeneratorError StoppingProcedure () ;
00106   T_GeneratorError ForcedStoppingProcedure () ;
00107   
00108 } ;
00109 
00110 #endif // _C_DISPLAYCONTROL_H
00111 
00112 

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