summaryrefslogtreecommitdiff
path: root/TAO/examples/Callback_Quoter/Consumer_i.h
blob: b26c6c8d9b6b885d05f818f2d0d61540045b9f50 (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
48
49
50
51
52
53
54
55
56
57
58
59
/* -*- C++ -*- */

//=============================================================================
/**
 *  @file    Consumer_i.h
 *
 *  Defines the implementation header for the Consumer interface.
 *
 *  @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
 */
//=============================================================================


#ifndef CONSUMER_I_H
#define CONSUMER_I_H
#include "ConsumerS.h"
#include "ConsumerC.h"
#include "NotifierS.h"

/**
 * @class Consumer_i
 *
 * @brief Consumer object implementation.
 *
 * This class has methods that are called by the callback quoter
 * server.
 */
class Consumer_i : public POA_Callback_Quoter::Consumer
{
public:
  // = Initialization and termination methods.
  /// Constructor.
  Consumer_i (void);

  /// Destructor.
  ~Consumer_i (void);

  /// Gets the stock information from the Notifier.
  void push (const Callback_Quoter::Info & data);

  /// Used to get the consumer to shut down.
  virtual void shutdown (void);

  /// Set the ORB pointer.
  void orb (CORBA::ORB_ptr o);

private:
  /// ORB pointer.
  CORBA::ORB_var orb_;

  /// If 1 denotes that the consumer is dead else alive.
  int quit_;

  // @@ Please rename to Notifier.
  /// Smart pointer to the Notifier object.
  Notifier_var server_;
};

#endif /* CONSUMER_I_H  */