Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / lib / StructuredEvent.cpp
blobf05dad97be847ed20823b9220341bac2efc0a5f1
1 #include "StructuredEvent.h"
4 TAO_Notify_Tests_StructuredEvent::TAO_Notify_Tests_StructuredEvent ()
8 TAO_Notify_Tests_StructuredEvent::~TAO_Notify_Tests_StructuredEvent ()
12 TAO_Notify_Tests_StructuredEvent::TAO_Notify_Tests_StructuredEvent (const char* name)
14 event_.header.fixed_header.event_name = CORBA::string_dup(name);
17 TAO_Notify_Tests_StructuredEvent::TAO_Notify_Tests_StructuredEvent (const char* domain, const char* type)
19 event_.header.fixed_header.event_type.domain_name = CORBA::string_dup(domain);
20 event_.header.fixed_header.event_type.type_name = CORBA::string_dup(type);
23 TAO_Notify_Tests_StructuredEvent::TAO_Notify_Tests_StructuredEvent (const char* name, const char* domain, const char* type)
25 event_.header.fixed_header.event_name = CORBA::string_dup(name);
26 event_.header.fixed_header.event_type.domain_name = CORBA::string_dup(domain);
27 event_.header.fixed_header.event_type.type_name = CORBA::string_dup(type);
30 void
31 TAO_Notify_Tests_StructuredEvent::name (const char* name)
33 event_.header.fixed_header.event_name = CORBA::string_dup(name);
36 void
37 TAO_Notify_Tests_StructuredEvent::type (const char* domain, const char* type)
39 event_.header.fixed_header.event_type.domain_name = CORBA::string_dup(domain);
40 event_.header.fixed_header.event_type.type_name = CORBA::string_dup(type);
43 const char*
44 TAO_Notify_Tests_StructuredEvent::type ()
46 return event_.header.fixed_header.event_type.type_name;
49 void
50 TAO_Notify_Tests_StructuredEvent::opt_header (const char* name, CORBA::Any& value)
52 CosNotification::PropertySeq& opt = event_.header.variable_header;
53 opt.length (opt.length () + 1);
55 opt[opt.length () - 1].name = CORBA::string_dup (name);
56 opt[opt.length () - 1].value = value;
59 void
60 TAO_Notify_Tests_StructuredEvent::filter (const char* name, CORBA::Any& value)
62 CosNotification::PropertySeq& filter = event_.filterable_data;
63 filter.length (filter.length () + 1);
65 filter[filter.length () - 1].name = CORBA::string_dup (name);
66 filter[filter.length () - 1].value = value;
69 void
70 TAO_Notify_Tests_StructuredEvent::qos (const char* name, CORBA::Any& value)
72 this->opt_header (name, value);
75 void
76 TAO_Notify_Tests_StructuredEvent::payload (CORBA::Any& value)
78 event_.remainder_of_body = value;
81 CosNotification::StructuredEvent&
82 TAO_Notify_Tests_StructuredEvent::event ()
84 return this->event_;