summaryrefslogtreecommitdiff
path: root/trunk/CIAO/examples/Display/NavDisplayGUI_exec/Worker.h
blob: 73aa649bd36c66846b4068ad08f84113102ead9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// $Id$

#ifndef __WORKER_H
#define __WORKER_H

#include "ace/Task.h"
#include "ace/Synch.h"
#include "tao/corba.h"
#include "RootPanel.h"

class Worker : public ACE_Task_Base
{
public:
  Worker (int argc, char *argv[])
        : argc_(argc), argv_(argv) {}
  // ctor

  virtual int svc (void);
  // The thread entry point.

  void waitUntillInitialized() {init_complete_.wait();}
  // blocks the calling thread until the GUI is initialized

  RootPanel* getMainWindow() const {return main_wnd_;}
  // Returns the pointer to main application window

private:
  RootPanel *main_wnd_;
  int argc_;
  char **argv_;

  ACE_Manual_Event init_complete_;
};

#endif // __WORKER_H