ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RealTime.cxx
Go to the documentation of this file.
1 
2 #include "RealTime.h"
3 
5 
6 // cannot make a namespace ?? unamed to try
7 // unamed bad idea, make global better like this, not sure
8 bool RealTime::status_rt = false;
9 RealTime* RealTime::frealtime = NULL;
10 
11 RealTime* RealTime::getInstance()
12 {
13  if ( status_rt )
14  return frealtime;
15  else {
16  frealtime = new RealTime();
17  status_rt = true;
18  return frealtime;
19  }
20 }
21 
23 {
24  if ( !status_rt ) {
25  std::cout << "RealTime::killInstance, but has not been run, nothing to do " << std::endl;
26  return;
27  }
28  else {
29  delete frealtime;
30  frealtime = 0;
31  status_rt = false;
32  }
33 }
34 
35 //not needed
37 {
38  //Connect("Timeout()", "RealTime", 0, "UpdateStock()");
39  Start(10000);
40 
41 }
static bool status_rt
Definition: RealTime.h:20
ClassImp(CanvasStock) CanvasStock
Definition: CanvasStock.cxx:15
static void killInstance()
Definition: RealTime.cxx:22
void ConnectToGUI()
Definition: RealTime.cxx:36
static RealTime * frealtime
Definition: RealTime.h:22