ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIObserver.cxx
Go to the documentation of this file.
1 
9 #include "GUIObserver.h"
10 //#include "../utils/ObsPattern_Obs.h" // not necessary ??
11 #include "../utils/ObsPattern_Sub.h"
12 #include "GUIMainController.h"
13 
14 //#undef DEBUG
15 
17 /* maybe for latter without argument
18 void GUIObserver::update(Subject * subject)
19 {
20  #ifdef DEBUG_CONT_FRAME
21  std::cout << "GUIObserver receive an update " << std::endl;
22  #endif
23  // first test simple force to UpdateGUI
24  // to improve
25  gui_control->UpdateGUI();
26 }
27 */
28 
31 void GUIObserver::update(Subject * /*subject*/, std::vector<std::string> & message)
32 {
33 #ifdef DEBUG_CONT_FRAME
34  std::cout << "GUIObserver::update receive an update with message[0] " << message[0] << std::endl;
35  std::cout << "Call gui_control->AddObserver_Message(message)" << std::endl;
36 #endif
37  gui_control->AddObserver_Message( message );
38 }
39 
40 
41 
Last modified.
void AddObserver_Message(std::vector< std::string > &message)
Only used to setup current_controller, really needed ? not really.
GUIMainController * gui_control
associates a gui_controller
Definition: GUIObserver.h:57
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