Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / Basic / Simple.h
blob0c54c254799f5e4b657f2f5733cefb6fc7ecfd08
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file Simple.h
6 * Simple test any supplier to any consumer.
8 * @author Pradeep Gore <pradeep@cs.wustl.edu>
9 */
10 //=============================================================================
13 #ifndef NOTIFY_TESTS_SIMPLE_H
14 #define NOTIFY_TESTS_SIMPLE_H
16 #include "Notify_Test_Client.h"
17 #include "Notify_PushConsumer.h"
18 #include "Notify_PushSupplier.h"
20 #if defined(_MSC_VER)
21 #pragma warning(push)
22 #pragma warning(disable:4250)
23 #endif /* _MSC_VER */
25 class Simple_Test;
27 /***************************************************************************/
29 class Event_AnyPushConsumer : public TAO_Notify_Tests_PushConsumer
31 public:
32 /// Constructor.
33 Event_AnyPushConsumer (Simple_Test *test_client);
35 // = PushSupplier methods
36 virtual void push (const CORBA::Any & data);
38 protected:
39 Simple_Test * test_client_;
42 /***************************************************************************/
44 class Event_AnyPushSupplier : public TAO_Notify_Tests_PushSupplier
46 public:
47 /// Constructor.
48 Event_AnyPushSupplier (Simple_Test * test_client);
50 /// Destructor.
51 virtual ~Event_AnyPushSupplier ();
53 protected:
54 Simple_Test* test_client_;
57 /***************************************************************************/
59 class Simple_Test : public Notify_Test_Client
61 public:
62 // Initialization and termination code
63 Simple_Test ();
64 virtual ~Simple_Test ();
66 int parse_args (int argc,
67 ACE_TCHAR *argv[]) ;
69 /// initialization.
70 int init (int argc,
71 ACE_TCHAR *argv []);
73 /// Called when an event is received.
74 void on_event_received ();
76 /// Run the test.
77 void run_test ();
79 /// End the test.
80 void end_test ();
82 /// check if we got the expected results.
83 int check_results ();
85 protected:
86 /// Create EC
87 void create_EC ();
89 /// Number of events received so far.
90 ACE_Atomic_Op <TAO_SYNCH_MUTEX, int> result_count_;
92 /// Number of events to send
93 int event_count_;
95 /// The one channel that we create using the factory.
96 CosNotifyChannelAdmin::EventChannel_var ec_;
98 /// The consumer admin used by consumers.
99 CosNotifyChannelAdmin::ConsumerAdmin_var consumer_admin_;
101 /// The supplier admin used by suppliers.
102 CosNotifyChannelAdmin::SupplierAdmin_var supplier_admin_;
104 /// Consumer.
105 TAO_Notify_Tests_PushConsumer* consumer_;
107 /// Supplier.
108 TAO_Notify_Tests_PushSupplier* supplier_;
110 private:
111 friend class Event_AnyPushSupplier;
112 friend class Event_AnyPushConsumer;
115 /***************************************************************************/
117 #if defined(_MSC_VER)
118 #pragma warning(pop)
119 #endif /* _MSC_VER */
121 #endif /* NOTIFY_TESTS_SIMPLE_H */