summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_3768_Regression/TestCallback.h
blob: 7eaef99fdf205690f1b7f2aa97567bced384c61d (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
36
37
38
39
40
41
42
43
44
45
46
47
//
// $Id: TestCallback.h
//

#ifndef TESTCALLBACK_H
#define TESTCALLBACK_H
#include /**/ "ace/pre.h"

#include "TestS.h"
#include "ace/Task.h"

class Worker : public ACE_Task_Base
{
public:
  Worker(CORBA::ORB_ptr orb) : orb_(CORBA::ORB::_duplicate(orb))
  {
  }

  int svc(void)
  {
    orb_->run();
    return 0;
  }

private:
  CORBA::ORB_var orb_;
};

/// Implement the Test::TestCallback interface
class TestCallback
  : public virtual POA_Test::TestCallback
{
public:
  /// Constructor
  TestCallback (CORBA::ORB_ptr orb);

  // = The skeleton methods
  virtual void start_threads_and_block (void);
  virtual void test_call (void);
  virtual void shutdown (void);

private:
  Worker work_;
};

#include /**/ "ace/post.h"
#endif /* TESTCALLBACK_H */