Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

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)
 Constructor.
virtual ~TAO_Notify_AnyEvent_No_Copy ()
 Destructor.
virtual const
TAO_Notify_EventType
type (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

static TAO_Notify_AnyEventunmarshal (TAO_InputCDR &cdr)

Protected Member Functions

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

Protected Attributes

const CORBA::Anyevent_

Static Protected Attributes

static TAO_Notify_EventType event_type_
 Our event type.

Friends

class TAO_Notify_Builder

Detailed Description

Definition at line 39 of file AnyEvent.h.


Constructor & Destructor Documentation

TAO_Notify_AnyEvent_No_Copy::TAO_Notify_AnyEvent_No_Copy ( const CORBA::Any event  ) 

Constructor.

Definition at line 21 of file AnyEvent.cpp.

  : event_ (&event)
{
}

TAO_Notify_AnyEvent_No_Copy::~TAO_Notify_AnyEvent_No_Copy (  )  [virtual]

Destructor.

Definition at line 26 of file AnyEvent.cpp.

{
}


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.

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

TAO_Notify_Event * TAO_Notify_AnyEvent_No_Copy::copy ( void   )  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.

{
  TAO_Notify_Event * new_event;
  ACE_NEW_THROW_EX (new_event,
                    TAO_Notify_AnyEvent (*this->event_),
                    CORBA::NO_MEMORY ());
  return new_event;
}

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.

{
  if (DEBUG_LEVEL > 0)
    ACE_DEBUG ((LM_DEBUG, "Notify (%P|%t) - "
                "TAO_Notify_AnyEvent::do_match ()\n"));

  return filter->match(*this->event_);
}

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.

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

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.

{
  if (DEBUG_LEVEL > 0)
    ACE_DEBUG ((LM_DEBUG, "Notify (%P|%t) - "
                "TAO_Notify_AnyEvent::push\n"));

  consumer->push (*this->event_);
}

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.

{
  CosNotification::StructuredEvent notification;

  TAO_Notify_Event::translate (*this->event_, notification);

  forwarder->forward_structured (notification);
}

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.

{
  forwarder->forward_any (*this->event_);
}

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.

{
  forwarder->forward_any_no_filtering (*this->event_);
}

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.

{
  CosNotification::StructuredEvent notification;

  TAO_Notify_Event::translate (*this->event_, notification);

  forwarder->forward_structured_no_filtering (notification);
}

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.

{
  return this->event_type_;
}

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.

{
  TAO_Notify_AnyEvent * event = 0;
  CORBA::Any body;
  if (cdr >> body)
  {
    event = new TAO_Notify_AnyEvent (body);
  }
  return event;
}


Friends And Related Function Documentation

friend class TAO_Notify_Builder [friend]

Definition at line 41 of file AnyEvent.h.


Member Data Documentation

Definition at line 89 of file AnyEvent.h.

Our event type.

Definition at line 92 of file AnyEvent.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines