ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SMSubject.cpp
Go to the documentation of this file.
1 
8 #include "SMSubject.h"
9 
11 {
12 #ifdef DEBUG_CPP
13  std::cout << "utils SMSubject::Updated no argument, will notify other " << std::endl;
14 #endif
15  // notify observers
16  notify();
17 #ifdef DEBUG_CPP
18  std::cout << "utils SMSubject::Updated() has been notified " << std::endl;
19 #endif
20 }
21 
22 void SMSubject::Updated( std::vector<std::string> & message )
23 {
24 #ifdef DEBUG_CPP
25  std::cout << "utils SMSubject::Updated with argument send: " << message[0] << " " << message[1] << std::endl;
26 #endif
27  // notify observers
28  notify( message );
29 #ifdef DEBUG_CPP
30  std::cout << "utils SMSubject::Updated() has been notified " << std::endl;
31 #endif
32 }
void Updated()
send updated function no argument
Definition: SMSubject.cpp:10
Concrete class for the subject/observable of StockManager.
void notify()
notify a message to all registered observer