diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-03 20:36:20 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-03 20:36:20 +0000 |
commit | 2c623a4f9475e3896439543c052a2aeaaffafec3 (patch) | |
tree | 6cbcef5dd9666d0aa1c6c1639b54b956644440a0 /TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp | |
parent | 2d534874522c5ec20a720560e1be45444acb1b93 (diff) | |
download | ATCD-2c623a4f9475e3896439543c052a2aeaaffafec3.tar.gz |
ChangeLogTag: Thu Apr 03 13:31:17 2003 Pradeep Gore <pradeep@oomworks.com>
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp b/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp new file mode 100644 index 00000000000..a19c1b84a5c --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/lib/StructuredEvent.cpp @@ -0,0 +1,88 @@ +// $Id$ + +#include "StructuredEvent.h" + +ACE_RCSID(RT_Notify, TAO_NS_StructuredEvent, "$id$") + +TAO_NS_StructuredEvent::TAO_NS_StructuredEvent (void) +{ +} + +TAO_NS_StructuredEvent::~TAO_NS_StructuredEvent () +{ +} + +TAO_NS_StructuredEvent::TAO_NS_StructuredEvent (const char* name) +{ + event_.header.fixed_header.event_name = CORBA::string_dup(name); +} + +TAO_NS_StructuredEvent::TAO_NS_StructuredEvent (const char* domain, const char* type) +{ + event_.header.fixed_header.event_type.domain_name = CORBA::string_dup(domain); + event_.header.fixed_header.event_type.type_name = CORBA::string_dup(type); +} + +TAO_NS_StructuredEvent::TAO_NS_StructuredEvent (const char* name, const char* domain, const char* type) +{ + event_.header.fixed_header.event_name = CORBA::string_dup(name); + event_.header.fixed_header.event_type.domain_name = CORBA::string_dup(domain); + event_.header.fixed_header.event_type.type_name = CORBA::string_dup(type); +} + +void +TAO_NS_StructuredEvent::name (const char* name) +{ + event_.header.fixed_header.event_name = CORBA::string_dup(name); +} + +void +TAO_NS_StructuredEvent::type (const char* domain, const char* type) +{ + event_.header.fixed_header.event_type.domain_name = CORBA::string_dup(domain); + event_.header.fixed_header.event_type.type_name = CORBA::string_dup(type); +} + +const char* +TAO_NS_StructuredEvent::type (void) +{ + return event_.header.fixed_header.event_type.type_name; +} + +void +TAO_NS_StructuredEvent::opt_header (const char* name, CORBA::Any& value) +{ + CosNotification::PropertySeq& opt = event_.header.variable_header; + opt.length (opt.length () + 1); + + opt[opt.length () - 1].name = CORBA::string_dup (name); + opt[opt.length () - 1].value = value; +} + +void +TAO_NS_StructuredEvent::filter (const char* name, CORBA::Any& value) +{ + CosNotification::PropertySeq& filter = event_.filterable_data; + filter.length (filter.length () + 1); + + filter[filter.length () - 1].name = CORBA::string_dup (name); + filter[filter.length () - 1].value = value; +} + +void +TAO_NS_StructuredEvent::qos (const char* name, CORBA::Any& value) +{ + this->opt_header (name, value); +} + +void +TAO_NS_StructuredEvent::payload (CORBA::Any& value) +{ + event_.remainder_of_body = value; +} + +CosNotification::StructuredEvent& +TAO_NS_StructuredEvent::event (void) +{ + return this->event_; +} |