TAO_Notify_StructuredEvent_No_Copy Class Reference

StructuredEvent implementation. More...

#include <StructuredEvent.h>

Inheritance diagram for TAO_Notify_StructuredEvent_No_Copy:

Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_StructuredEvent_No_Copy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Notify_StructuredEvent_No_Copy (const CosNotification::StructuredEvent &notification)
 Constuctor.

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 &notification) const
 Convert to CosNotification::Structured type.

virtual const TAO_Notify_EventTypetype (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

TAO_Notify_StructuredEventunmarshal (TAO_InputCDR &cdr)

Protected Member Functions

virtual TAO_Notify_Eventcopy () const
 returns a copy of this event allocated on the heap


Protected Attributes

const CosNotification::StructuredEventnotification_
 Structured Event.

const TAO_Notify_EventType type_
 Our type.


Detailed Description

StructuredEvent implementation.

Definition at line 36 of file StructuredEvent.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Notify_StructuredEvent_No_Copy::TAO_Notify_StructuredEvent_No_Copy const CosNotification::StructuredEvent notification  ) 
 

Constuctor.

Definition at line 14 of file StructuredEvent.cpp.

References CosNotification::StructuredEvent::header, CosNotification::PropertySeq, TAO_Notify_Property_T< TYPE >::set(), and ACE_OS::strcmp().

00015   : notification_ (&notification), 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]
 

Destructor.

Definition at line 34 of file StructuredEvent.cpp.

00035 {
00036 }


Member Function Documentation

void TAO_Notify_StructuredEvent_No_Copy::convert CosNotification::StructuredEvent notification  )  const [virtual]
 

Convert to CosNotification::Structured type.

Implements TAO_Notify_Event.

Definition at line 81 of file StructuredEvent.cpp.

References notification_.

00082 {
00083   notification = *this->notification_;
00084 }

TAO_Notify_Event * TAO_Notify_StructuredEvent_No_Copy::copy  )  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_CHECK_RETURN, and 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   ACE_CHECK_RETURN (0);
00067   return new_event;
00068 }

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 71 of file StructuredEvent.cpp.

References ACE_DEBUG, ACE_ENV_ARG_PARAMETER, LM_DEBUG, and TAO_debug_level.

00072 {
00073   if (TAO_debug_level > 0)
00074     ACE_DEBUG ((LM_DEBUG, "Notify (%P|%t) - "
00075                 "TAO_Notify_StructuredEvent::do_match ()\n"));
00076 
00077   return filter->match_structured (*this->notification_ ACE_ENV_ARG_PARAMETER);
00078 }

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 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 110 of file StructuredEvent.cpp.

References ACE_ENV_ARG_PARAMETER, and TAO_Notify_Event::translate().

00111 {
00112   CORBA::Any any;
00113 
00114   TAO_Notify_Event::translate (*this->notification_, any);
00115 
00116   forwarder->forward_any (any ACE_ENV_ARG_PARAMETER);
00117 }

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 98 of file StructuredEvent.cpp.

References ACE_ENV_ARG_PARAMETER.

00099 {
00100   forwarder->forward_structured (*this->notification_ ACE_ENV_ARG_PARAMETER);
00101 }

void TAO_Notify_StructuredEvent_No_Copy::push TAO_Notify_Consumer consumer  )  const [virtual]
 

Push event to consumer.

Implements TAO_Notify_Event.

Definition at line 87 of file StructuredEvent.cpp.

References ACE_DEBUG, ACE_ENV_ARG_PARAMETER, LM_DEBUG, and TAO_debug_level.

00088 {
00089   if (TAO_debug_level > 0)
00090     ACE_DEBUG ((LM_DEBUG, "Notify (%P|%t) - "
00091                           "TAO_Notify_StructuredEvent::do_push ("
00092                           "CosNotifyComm::StructuredPushConsumer_ptr)\n"));
00093 
00094   consumer->push (*this->notification_ ACE_ENV_ARG_PARAMETER);
00095 }

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 120 of file StructuredEvent.cpp.

References ACE_ENV_ARG_PARAMETER, and TAO_Notify_Event::translate().

00121 {
00122   CORBA::Any any;
00123 
00124   TAO_Notify_Event::translate (*this->notification_, any);
00125 
00126   forwarder->forward_any_no_filtering (any ACE_ENV_ARG_PARAMETER);
00127 }

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 104 of file StructuredEvent.cpp.

References ACE_ENV_ARG_PARAMETER.

00105 {
00106   forwarder->forward_structured_no_filtering (*this->notification_ ACE_ENV_ARG_PARAMETER);
00107 }

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.

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)

Returns:
the new event, or NULL if this is the wrong type of event.

Reimplemented from TAO_Notify_Event.

Definition at line 48 of file StructuredEvent.cpp.

References TAO_Notify_StructuredEvent.

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 }


Member Data Documentation

const CosNotification::StructuredEvent* TAO_Notify_StructuredEvent_No_Copy::notification_ [protected]
 

Structured Event.

Definition at line 80 of file StructuredEvent.h.

Referenced by convert(), and marshal().

const TAO_Notify_EventType TAO_Notify_StructuredEvent_No_Copy::type_ [protected]
 

Our type.

Definition at line 83 of file StructuredEvent.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:33:22 2006 for TAO_CosNotification by doxygen 1.3.6