#include <StructuredEvent.h>
Inheritance diagram for TAO_Notify_StructuredEvent_No_Copy:
Public Member Functions | |
TAO_Notify_StructuredEvent_No_Copy (const CosNotification::StructuredEvent ¬ification) | |
Constructor. | |
virtual | ~TAO_Notify_StructuredEvent_No_Copy () |
Destructor. | |
virtual void | marshal (TAO_OutputCDR &cdr) const |
marshal this event into a CDR buffer (for persistence) | |
CORBA::Boolean | do_match (CosNotifyFilter::Filter_ptr filter) const |
Returns true if the filter matches. | |
virtual void | convert (CosNotification::StructuredEvent ¬ification) const |
Convert to CosNotification::Structured type. | |
virtual const TAO_Notify_EventType & | type (void) const |
Get the event type. | |
virtual void | push (TAO_Notify_Consumer *consumer) const |
Push event to consumer. | |
virtual void | push (Event_Forwarder::StructuredProxyPushSupplier_ptr forwarder) const |
Push event to the Event_Forwarder interface. | |
virtual void | push_no_filtering (Event_Forwarder::StructuredProxyPushSupplier_ptr forwarder) const |
Push event to the Event_Forwarder interface. | |
virtual void | push (Event_Forwarder::ProxyPushSupplier_ptr forwarder) const |
Push event to the Event_Forwarder interface. | |
virtual void | push_no_filtering (Event_Forwarder::ProxyPushSupplier_ptr forwarder) const |
Push event to the Event_Forwarder interface. | |
Static Public Member Functions | |
static TAO_Notify_StructuredEvent * | unmarshal (TAO_InputCDR &cdr) |
Protected Member Functions | |
virtual TAO_Notify_Event * | copy (void) const |
returns a copy of this event allocated on the heap | |
Protected Attributes | |
const CosNotification::StructuredEvent * | notification_ |
Structured Event. | |
const TAO_Notify_EventType | type_ |
Our type. |
Definition at line 36 of file StructuredEvent.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Notify_StructuredEvent_No_Copy::TAO_Notify_StructuredEvent_No_Copy | ( | const CosNotification::StructuredEvent & | notification | ) |
Constructor.
Definition at line 14 of file StructuredEvent.cpp.
References CosNotification::StructuredEvent::header, CosNotification::Priority, TAO_Notify_Event::priority_, TAO_Notify_Property_T< TYPE >::set(), ACE_OS::strcmp(), CosNotification::Timeout, and TAO_Notify_Event::timeout_.
00015 : notification_ (¬ification), type_ (notification.header.fixed_header.event_type) 00016 { 00017 const CosNotification::PropertySeq& prop_seq = notification.header.variable_header; 00018 00019 for (CORBA::ULong i = 0; i < prop_seq.length (); ++i) 00020 { 00021 if (ACE_OS::strcmp (prop_seq[i].name.in (), CosNotification::Priority) == 0) 00022 this->priority_.set (prop_seq[i].value); 00023 else if (ACE_OS::strcmp (prop_seq[i].name.in (), CosNotification::Timeout) == 0) 00024 this->timeout_.set (prop_seq[i].value); 00025 } 00026 }
TAO_Notify_StructuredEvent_No_Copy::~TAO_Notify_StructuredEvent_No_Copy | ( | ) | [virtual] |
void TAO_Notify_StructuredEvent_No_Copy::convert | ( | CosNotification::StructuredEvent & | notification | ) | const [virtual] |
Convert to CosNotification::Structured type.
Implements TAO_Notify_Event.
Definition at line 80 of file StructuredEvent.cpp.
References notification_.
00081 { 00082 notification = *this->notification_; 00083 }
TAO_Notify_Event * TAO_Notify_StructuredEvent_No_Copy::copy | ( | void | ) | const [protected, virtual] |
returns a copy of this event allocated on the heap
Implements TAO_Notify_Event.
Definition at line 60 of file StructuredEvent.cpp.
References ACE_NEW_THROW_EX.
00061 { 00062 TAO_Notify_Event * new_event; 00063 ACE_NEW_THROW_EX (new_event, 00064 TAO_Notify_StructuredEvent (*this->notification_), 00065 CORBA::NO_MEMORY ()); 00066 return new_event; 00067 }
CORBA::Boolean TAO_Notify_StructuredEvent_No_Copy::do_match | ( | CosNotifyFilter::Filter_ptr | filter | ) | const [virtual] |
Returns true if the filter matches.
Implements TAO_Notify_Event.
Definition at line 70 of file StructuredEvent.cpp.
References ACE_DEBUG, LM_DEBUG, and TAO_debug_level.
00071 { 00072 if (TAO_debug_level > 0) 00073 ACE_DEBUG ((LM_DEBUG, "Notify (%P|%t) - " 00074 "TAO_Notify_StructuredEvent::do_match ()\n")); 00075 00076 return filter->match_structured (*this->notification_); 00077 }
void TAO_Notify_StructuredEvent_No_Copy::marshal | ( | TAO_OutputCDR & | cdr | ) | const [virtual] |
marshal this event into a CDR buffer (for persistence)
Implements TAO_Notify_Event.
Definition at line 39 of file StructuredEvent.cpp.
References TAO_Notify_Event::MARSHAL_STRUCTURED, notification_, and ACE_OutputCDR::write_octet().
00040 { 00041 static const ACE_CDR::Octet STRUCTURED_CODE = MARSHAL_STRUCTURED; 00042 cdr.write_octet (STRUCTURED_CODE); 00043 cdr << (*this->notification_); 00044 }
void TAO_Notify_StructuredEvent_No_Copy::push | ( | Event_Forwarder::ProxyPushSupplier_ptr | forwarder | ) | const [virtual] |
Push event to the Event_Forwarder interface.
Implements TAO_Notify_Event.
Definition at line 109 of file StructuredEvent.cpp.
References TAO_Notify_Event::translate().
00110 { 00111 CORBA::Any any; 00112 00113 TAO_Notify_Event::translate (*this->notification_, any); 00114 00115 forwarder->forward_any (any); 00116 }
void TAO_Notify_StructuredEvent_No_Copy::push | ( | Event_Forwarder::StructuredProxyPushSupplier_ptr | forwarder | ) | const [virtual] |
Push event to the Event_Forwarder interface.
Implements TAO_Notify_Event.
Definition at line 97 of file StructuredEvent.cpp.
void TAO_Notify_StructuredEvent_No_Copy::push | ( | TAO_Notify_Consumer * | consumer | ) | const [virtual] |
Push event to consumer.
Implements TAO_Notify_Event.
Definition at line 86 of file StructuredEvent.cpp.
References ACE_DEBUG, LM_DEBUG, TAO_Notify_Consumer::push(), and TAO_debug_level.
00087 { 00088 if (TAO_debug_level > 0) 00089 ACE_DEBUG ((LM_DEBUG, "Notify (%P|%t) - " 00090 "TAO_Notify_StructuredEvent::do_push (" 00091 "CosNotifyComm::StructuredPushConsumer_ptr)\n")); 00092 00093 consumer->push (*this->notification_); 00094 }
void TAO_Notify_StructuredEvent_No_Copy::push_no_filtering | ( | Event_Forwarder::ProxyPushSupplier_ptr | forwarder | ) | const [virtual] |
Push event to the Event_Forwarder interface.
Implements TAO_Notify_Event.
Definition at line 119 of file StructuredEvent.cpp.
References TAO_Notify_Event::translate().
00120 { 00121 CORBA::Any any; 00122 00123 TAO_Notify_Event::translate (*this->notification_, any); 00124 00125 forwarder->forward_any_no_filtering (any); 00126 }
void TAO_Notify_StructuredEvent_No_Copy::push_no_filtering | ( | Event_Forwarder::StructuredProxyPushSupplier_ptr | forwarder | ) | const [virtual] |
Push event to the Event_Forwarder interface.
Implements TAO_Notify_Event.
Definition at line 103 of file StructuredEvent.cpp.
const TAO_Notify_EventType & TAO_Notify_StructuredEvent_No_Copy::type | ( | void | ) | const [virtual] |
Get the event type.
Implements TAO_Notify_Event.
Definition at line 29 of file StructuredEvent.cpp.
References type_.
00030 { 00031 return this->type_; 00032 }
TAO_Notify_StructuredEvent * TAO_Notify_StructuredEvent_No_Copy::unmarshal | ( | TAO_InputCDR & | cdr | ) | [static] |
unmarshal this event from a CDR buffer (for persistence)
Reimplemented from TAO_Notify_Event.
Definition at line 48 of file StructuredEvent.cpp.
Referenced by TAO_Notify_Event::unmarshal().
00049 { 00050 TAO_Notify_StructuredEvent * event = 0; 00051 CosNotification::StructuredEvent body; 00052 if (cdr >> body) 00053 { 00054 event = new TAO_Notify_StructuredEvent (body); 00055 } 00056 return event; 00057 }
const CosNotification::StructuredEvent* TAO_Notify_StructuredEvent_No_Copy::notification_ [protected] |
Structured Event.
Definition at line 80 of file StructuredEvent.h.
Referenced by convert(), marshal(), and TAO_Notify_StructuredEvent::TAO_Notify_StructuredEvent().
const TAO_Notify_EventType TAO_Notify_StructuredEvent_No_Copy::type_ [protected] |