ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIObserver.h
Go to the documentation of this file.
1 
6 #ifndef GUIOBSERVER_H_
7 #define GUIOBSERVER_H_
8 
9 #include <iostream>
10 
11 #include "../utils/ObsPattern_Obs.h"
12 
13 class Subject;
14 class GUIMainController;
15 
29 class GUIObserver : public Observer
30 {
31  public:
33  gui_control = 0;
34  #ifdef DEBUG_CONT_FRAME
35  std::cout << "Constructor GUIObserver default" << std::endl;
36  #endif
37  }
38  GUIObserver( GUIMainController *main_guicontrol ) : Observer(), gui_control( main_guicontrol ) {
39  #ifdef DEBUG_CONT_FRAME
40  std::cout << "Constructor GUIObserver with argument mainframe" << std::endl;
41  #endif
42  }
43  virtual ~GUIObserver() {
44  gui_control = 0;
45  // unregister here ??
46  #ifdef DEBUG_CONT_FRAME
47  std::cout << "Destructor GUIObserver" << std::endl;
48  #endif
49  }
50 
53  virtual void update(Subject * /*subject*/, std::vector<std::string> & message );
54 
55  private:
58 
59 };
60 
61 #endif /* GUIOBSERVER_H_ */
GUIMainController * gui_control
associates a gui_controller
Definition: GUIObserver.h:57
Main controller of the application, linked to the view GUIMainFrame.
Concrete class of an observer.
Definition: GUIObserver.h:29
Receive notification from the python update.
virtual ~GUIObserver()
Definition: GUIObserver.h:43
GUIObserver(GUIMainController *main_guicontrol)
Definition: GUIObserver.h:38
virtual void update(Subject *, std::vector< std::string > &message)
overwritte the (pure) virtual function of Observer subject not used here, but said better...
Definition: GUIObserver.cxx:31