Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / AMI_Buffering / AMI_Buffering.h
blob22de3af8fee3e52c690b7306d5fe86d8a7bd007c
2 #ifndef AMI_BUFFERING_H
3 #define AMI_BUFFERING_H
4 #include /**/ "ace/pre.h"
6 #include "TestS.h"
8 /// Implement the Test::AMI_Buffering interface
9 class AMI_Buffering
10 : public virtual POA_Test::AMI_Buffering
12 public:
13 /// Constructor
14 AMI_Buffering (CORBA::ORB_ptr orb,
15 Test::AMI_Buffering_Admin_ptr admin);
17 // = The skeleton methods
18 virtual void receive_data (const Test::Payload &the_payload);
20 virtual void flush ();
22 virtual void sync ();
24 virtual void shutdown ();
26 /// internal implementation of shutdown. This
27 void try_shutdown ();
29 class Nest_Guard
31 public:
32 Nest_Guard (AMI_Buffering &);
33 ~Nest_Guard ();
34 private:
35 AMI_Buffering &target_;
38 /// Use an ORB reference to shutdown the application.
39 CORBA::ORB_var orb_;
41 /// Report request progress to this interface
42 Test::AMI_Buffering_Admin_var admin_;
44 /// nesting depth count for receive_data processing
45 int nest_;
47 /// maximum nesting depth reached during run
48 int max_nest_;
50 /// flag indicating that a shutdown is required as soon
51 /// as the nest count reaches 0.
52 bool must_shutdown_;
55 #include /**/ "ace/post.h"
56 #endif /* AMI_BUFFERING_H */