Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / lib / StructuredEvent.h
blob605b84bfb95a68b6657b2766750f8fc11de3f682
1 /* -*- C++ -*- */
2 /**
3 * @file StructuredEvent.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
6 */
8 #ifndef TAO_Notify_Tests_STRUCTUREDEVENT_H
9 #define TAO_Notify_Tests_STRUCTUREDEVENT_H
11 #include /**/ "ace/pre.h"
12 #include "notify_test_export.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
15 # pragma once
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "orbsvcs/CosNotificationC.h"
20 /**
21 * @class TAO_Notify_Tests_StructuredEvent
23 * @brief Helper class to populate a CosNotification::StructuredEvent.
25 class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_StructuredEvent
27 public:
28 /// Constructor
29 TAO_Notify_Tests_StructuredEvent ();
30 TAO_Notify_Tests_StructuredEvent (const char* name);
31 TAO_Notify_Tests_StructuredEvent (const char* domain, const char* type);
32 TAO_Notify_Tests_StructuredEvent (const char* name, const char* domain, const char* type);
34 /// Destructor
35 ~TAO_Notify_Tests_StructuredEvent ();
37 void name (const char* name);
38 void type (const char* domain, const char* type);
40 const char* type ();
42 /// add <name,value> to optional header sequence.
43 void opt_header (const char* name, CORBA::Any& value);
45 /// add <name,value> to filterable body sequence.
46 void filter (const char* name, CORBA::Any& value);
48 /// add <name,value> to variable header sequence.
49 void qos (const char* name, CORBA::Any& value);
51 /// The remainder_of_body
52 void payload (CORBA::Any& value);
54 /// access the underlying event.
55 CosNotification::StructuredEvent& event ();
57 private:
58 CosNotification::StructuredEvent event_;
61 #include /**/ "ace/post.h"
62 #endif /* TAO_Notify_Tests_STRUCTUREDEVENT_H */