TAO_Notify_AnyEvent_No_Copy Class Reference

#include <AnyEvent.h>

Inheritance diagram for TAO_Notify_AnyEvent_No_Copy:

Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_AnyEvent_No_Copy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Notify_AnyEvent_No_Copy (const CORBA::Any &event)
 Constuctor.

virtual ~TAO_Notify_AnyEvent_No_Copy ()
 Destructor.

virtual const TAO_Notify_EventTypetype (void) const
 Get the event type.

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 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.

virtual void marshal (TAO_OutputCDR &cdr) const
 marshal this event into a CDR buffer (for persistence)


Static Public Member Functions

TAO_Notify_AnyEventunmarshal (TAO_InputCDR &cdr)

Protected Member Functions

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


Protected Attributes

const CORBA::Any * event_

Static Protected Attributes

TAO_Notify_EventType event_type_
 Our event type.


Friends

class TAO_Notify_Builder

Constructor & Destructor Documentation

TAO_Notify_AnyEvent_No_Copy::TAO_Notify_AnyEvent_No_Copy const CORBA::Any &  event  ) 
 

Constuctor.

Definition at line 21 of file AnyEvent.cpp.

00022   : event_ (&event)
00023 {
00024 }

TAO_Notify_AnyEvent_No_Copy::~TAO_Notify_AnyEvent_No_Copy  )  [virtual]
 

Destructor.

Definition at line 26 of file AnyEvent.cpp.

00027 {
00028 }


Member Function Documentation

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

Convert to CosNotification::Structured type.

Implements TAO_Notify_Event.

Definition at line 37 of file AnyEvent.cpp.

References TAO_Notify_Event::translate().

00038 {
00039   TAO_Notify_Event::translate (*this->event_, notification);
00040 }

TAO_Notify_Event * TAO_Notify_AnyEvent_No_Copy::copy  )  const [protected, virtual]
 

returns a copy of this event allocated from the heap

Implements TAO_Notify_Event.

Definition at line 116 of file AnyEvent.cpp.

References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.

00117 {
00118   TAO_Notify_Event * new_event;
00119   ACE_NEW_THROW_EX (new_event,
00120                     TAO_Notify_AnyEvent (*this->event_),
00121                     CORBA::NO_MEMORY ());
00122   ACE_CHECK_RETURN (0);
00123   return new_event;
00124 }

CORBA::Boolean TAO_Notify_AnyEvent_No_Copy::do_match CosNotifyFilter::Filter_ptr  filter  )  const [virtual]
 

Returns true if the filter matches.

Implements TAO_Notify_Event.

Definition at line 43 of file AnyEvent.cpp.

References ACE_DEBUG, ACE_ENV_ARG_PARAMETER, DEBUG_LEVEL, and LM_DEBUG.

00044 {
00045   if (DEBUG_LEVEL > 0)
00046     ACE_DEBUG ((LM_DEBUG, "Notify (%P|%t) - "
00047                 "TAO_Notify_AnyEvent::do_match ()\n"));
00048 
00049   return filter->match(*this->event_ ACE_ENV_ARG_PARAMETER);
00050 }

void TAO_Notify_AnyEvent_No_Copy::marshal TAO_OutputCDR cdr  )  const [virtual]
 

marshal this event into a CDR buffer (for persistence)

Implements TAO_Notify_Event.

Definition at line 95 of file AnyEvent.cpp.

References ACE_OutputCDR::write_octet().

00096 {
00097   const ACE_CDR::Octet ANY_CODE = MARSHAL_ANY;
00098   cdr.write_octet (ANY_CODE);
00099   cdr << (*this->event_);
00100 }

void TAO_Notify_AnyEvent_No_Copy::push Event_Forwarder::ProxyPushSupplier_ptr  forwarder  )  const [virtual]
 

Push event to the Event_Forwarder interface.

Implements TAO_Notify_Event.

Definition at line 83 of file AnyEvent.cpp.

References ACE_ENV_ARG_PARAMETER.

00084 {
00085   forwarder->forward_any (*this->event_ ACE_ENV_ARG_PARAMETER);
00086 }

void TAO_Notify_AnyEvent_No_Copy::push Event_Forwarder::StructuredProxyPushSupplier_ptr  forwarder  )  const [virtual]
 

Push event to the Event_Forwarder interface.

Implements TAO_Notify_Event.

Definition at line 63 of file AnyEvent.cpp.

References ACE_ENV_ARG_PARAMETER, and TAO_Notify_Event::translate().

00064 {
00065   CosNotification::StructuredEvent notification;
00066 
00067   TAO_Notify_Event::translate (*this->event_, notification);
00068 
00069   forwarder->forward_structured (notification ACE_ENV_ARG_PARAMETER);
00070 }

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

Push event to consumer.

Implements TAO_Notify_Event.

Definition at line 53 of file AnyEvent.cpp.

References ACE_DEBUG, ACE_ENV_ARG_PARAMETER, DEBUG_LEVEL, and LM_DEBUG.

00054 {
00055   if (DEBUG_LEVEL > 0)
00056     ACE_DEBUG ((LM_DEBUG, "Notify (%P|%t) - "
00057                 "TAO_Notify_AnyEvent::push \n"));
00058 
00059   consumer->push (*this->event_ ACE_ENV_ARG_PARAMETER);
00060 }

void TAO_Notify_AnyEvent_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 89 of file AnyEvent.cpp.

References ACE_ENV_ARG_PARAMETER.

00090 {
00091   forwarder->forward_any_no_filtering (*this->event_ ACE_ENV_ARG_PARAMETER);
00092 }

void TAO_Notify_AnyEvent_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 73 of file AnyEvent.cpp.

References ACE_ENV_ARG_PARAMETER, and TAO_Notify_Event::translate().

00074 {
00075   CosNotification::StructuredEvent notification;
00076 
00077   TAO_Notify_Event::translate (*this->event_, notification);
00078 
00079   forwarder->forward_structured_no_filtering (notification ACE_ENV_ARG_PARAMETER);
00080 }

const TAO_Notify_EventType & TAO_Notify_AnyEvent_No_Copy::type void   )  const [virtual]
 

Get the event type.

Implements TAO_Notify_Event.

Definition at line 31 of file AnyEvent.cpp.

References event_type_.

00032 {
00033   return this->event_type_;
00034 }

TAO_Notify_AnyEvent * TAO_Notify_AnyEvent_No_Copy::unmarshal TAO_InputCDR cdr  )  [static]
 

unmarshal this event from a CDR buffer (for persistence)

Parameters:
code a code indicating what type of event to create.
cdr a CDR stream containing the marshalled data for the event.
Returns:
the new event, or NULL if this is the wrong type of event.

Reimplemented from TAO_Notify_Event.

Definition at line 104 of file AnyEvent.cpp.

Referenced by TAO_Notify_Event::unmarshal().

00105 {
00106   TAO_Notify_AnyEvent * event = 0;
00107   CORBA::Any body;
00108   if (cdr >> body)
00109   {
00110     event = new TAO_Notify_AnyEvent (body);
00111   }
00112   return event;
00113 }


Friends And Related Function Documentation

friend class TAO_Notify_Builder [friend]
 

Definition at line 41 of file AnyEvent.h.


Member Data Documentation

const CORBA::Any* TAO_Notify_AnyEvent_No_Copy::event_ [protected]
 

Definition at line 89 of file AnyEvent.h.

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Notify_EventType TAO_Notify_AnyEvent_No_Copy::event_type_ [static, protected]
 

Our event type.

Definition at line 19 of file AnyEvent.cpp.

Referenced by type().


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