Base class abstraction for Events flowing through the EventChannel. More...
#include <Event.h>


Public Types | |
| enum | { MARSHAL_ANY = 1, MARSHAL_STRUCTURED = 2 } |
| typedef TAO_Notify_Refcountable_Guard_T < TAO_Notify_Event > | Ptr |
Public Member Functions | |
| TAO_Notify_Event (void) | |
| Constructor. | |
| virtual | ~TAO_Notify_Event () |
| Destructor. | |
| virtual const TAO_Notify_EventType & | type (void) const =0 |
| Get the event type. | |
| virtual CORBA::Boolean | do_match (CosNotifyFilter::Filter_ptr filter) const =0 |
| Returns true if the filter matches. | |
| virtual void | convert (CosNotification::StructuredEvent ¬ification) const =0 |
| Convert to CosNotification::Structured type. | |
| virtual void | push (TAO_Notify_Consumer *consumer) const =0 |
| Push event to consumer. | |
| virtual void | push (Event_Forwarder::StructuredProxyPushSupplier_ptr forwarder) const =0 |
| Push event to the Event_Forwarder interface. | |
| virtual void | push_no_filtering (Event_Forwarder::StructuredProxyPushSupplier_ptr forwarder) const =0 |
| Push event to the Event_Forwarder interface. | |
| virtual void | push (Event_Forwarder::ProxyPushSupplier_ptr forwarder) const =0 |
| Push event to the Event_Forwarder interface. | |
| virtual void | push_no_filtering (Event_Forwarder::ProxyPushSupplier_ptr forwarder) const =0 |
| Push event to the Event_Forwarder interface. | |
| TAO_Notify_Event * | queueable_copy (void) const |
| virtual void | marshal (TAO_OutputCDR &cdr) const =0 |
| marshal this event into a CDR buffer (for persistence) | |
| const TAO_Notify_Property_Short & | priority (void) const |
| const TAO_Notify_Property_Time & | timeout (void) const |
| Timeout. | |
| const TAO_Notify_Property_Boolean & | reliable (void) const |
| Reliable. | |
| const ACE_Time_Value & | creation_time (void) const |
| Event creation time. | |
Static Public Member Functions | |
| static void | translate (const CORBA::Any &any, CosNotification::StructuredEvent ¬ification) |
| Translate Any to Structured. | |
| static void | translate (const CosNotification::StructuredEvent ¬ification, CORBA::Any &any) |
| Translate Structured to Any. | |
| static TAO_Notify_Event * | unmarshal (TAO_InputCDR &cdr) |
| Unmarshal an event from a CDR. (for persistence). | |
Protected Attributes | |
| TAO_Notify_Property_Short | priority_ |
| = QoS properties | |
| TAO_Notify_Property_Time | timeout_ |
| Timeout. | |
| TAO_Notify_Property_Boolean | reliable_ |
| Reliability. | |
Private Member Functions | |
| virtual TAO_Notify_Event * | copy (void) const =0 |
| Return a pointer to a copy of this event on the heap. | |
| virtual void | release (void) |
Private Attributes | |
| Ptr | clone_ |
| bool | is_on_heap_ |
| ACE_Time_Value | time_ |
Base class abstraction for Events flowing through the EventChannel.
Definition at line 45 of file Event.h.
| anonymous enum |
Definition at line 53 of file Event.h.
{MARSHAL_ANY=1,MARSHAL_STRUCTURED=2};
| TAO_Notify_Event::TAO_Notify_Event | ( | void | ) |
Constructor.
Definition at line 22 of file Event.cpp.
: priority_ (CosNotification::Priority, CosNotification::DefaultPriority) , timeout_ (CosNotification::Timeout) , reliable_ (CosNotification::EventReliability, true) , clone_ (0) , is_on_heap_ (false) , time_ (ACE_OS::gettimeofday ()) { // if (TAO_debug_level > 0) // ACE_DEBUG ((LM_DEBUG,"event:%x created\n", this )); }
| TAO_Notify_Event::~TAO_Notify_Event | ( | ) | [virtual] |
| virtual void TAO_Notify_Event::convert | ( | CosNotification::StructuredEvent & | notification | ) | const [pure virtual] |
Convert to CosNotification::Structured type.
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| virtual TAO_Notify_Event* TAO_Notify_Event::copy | ( | void | ) | const [private, pure virtual] |
Return a pointer to a copy of this event on the heap.
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| const ACE_Time_Value & TAO_Notify_Event::creation_time | ( | void | ) | const |
| virtual CORBA::Boolean TAO_Notify_Event::do_match | ( | CosNotifyFilter::Filter_ptr | filter | ) | const [pure virtual] |
Returns true if the filter matches.
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| virtual void TAO_Notify_Event::marshal | ( | TAO_OutputCDR & | cdr | ) | const [pure virtual] |
marshal this event into a CDR buffer (for persistence)
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| const TAO_Notify_Property_Short & TAO_Notify_Event::priority | ( | void | ) | const |
| virtual void TAO_Notify_Event::push | ( | Event_Forwarder::ProxyPushSupplier_ptr | forwarder | ) | const [pure virtual] |
Push event to the Event_Forwarder interface.
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| virtual void TAO_Notify_Event::push | ( | TAO_Notify_Consumer * | consumer | ) | const [pure virtual] |
Push event to consumer.
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| virtual void TAO_Notify_Event::push | ( | Event_Forwarder::StructuredProxyPushSupplier_ptr | forwarder | ) | const [pure virtual] |
Push event to the Event_Forwarder interface.
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| virtual void TAO_Notify_Event::push_no_filtering | ( | Event_Forwarder::StructuredProxyPushSupplier_ptr | forwarder | ) | const [pure virtual] |
Push event to the Event_Forwarder interface.
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| virtual void TAO_Notify_Event::push_no_filtering | ( | Event_Forwarder::ProxyPushSupplier_ptr | forwarder | ) | const [pure virtual] |
Push event to the Event_Forwarder interface.
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| TAO_Notify_Event * TAO_Notify_Event::queueable_copy | ( | void | ) | const |
Return a pointer to a copy of this event on the heap. The event is not owned by the caller, so it should not be deleted or released.
Definition at line 33 of file Event.inl.
{
if ( is_on_heap_ )
{
return const_cast< TAO_Notify_Event* >( this );
}
else if (this->clone_.get() == 0)
{
TAO_Notify_Event* copied = this->copy ();
copied->is_on_heap_ = true;
this->clone_.reset( copied );
}
return this->clone_.get();
}
| void TAO_Notify_Event::release | ( | void | ) | [private, virtual] |
| const TAO_Notify_Property_Boolean & TAO_Notify_Event::reliable | ( | void | ) | const |
| const TAO_Notify_Property_Time & TAO_Notify_Event::timeout | ( | void | ) | const |
| void TAO_Notify_Event::translate | ( | const CORBA::Any & | any, | |
| CosNotification::StructuredEvent & | notification | |||
| ) | [static] |
Translate Any to Structured.
Definition at line 46 of file Event.cpp.
{
notification.remainder_of_body <<= any;
notification.header.fixed_header.event_type.type_name = CORBA::string_dup ("%ANY");
notification.header.fixed_header.event_type.domain_name = CORBA::string_dup ("");
}
| void TAO_Notify_Event::translate | ( | const CosNotification::StructuredEvent & | notification, | |
| CORBA::Any & | any | |||
| ) | [static] |
| virtual const TAO_Notify_EventType& TAO_Notify_Event::type | ( | void | ) | const [pure virtual] |
Get the event type.
Implemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
| TAO_Notify_Event * TAO_Notify_Event::unmarshal | ( | TAO_InputCDR & | cdr | ) | [static] |
Unmarshal an event from a CDR. (for persistence).
Reimplemented in TAO_Notify_AnyEvent_No_Copy, and TAO_Notify_StructuredEvent_No_Copy.
Definition at line 61 of file Event.cpp.
{
TAO_Notify_Event * result = 0;
ACE_CDR::Octet code = 0;
if (cdr.read_octet (code))
{
switch (code)
{
case MARSHAL_ANY:
result = TAO_Notify_AnyEvent::unmarshal (cdr);
break;
case MARSHAL_STRUCTURED:
result = TAO_Notify_StructuredEvent::unmarshal (cdr);
break;
default:
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) TAO_Notify_Event::unmarshal: unknown event code %d\n"),
code));
break;
}
}
return result;
}
Ptr TAO_Notify_Event::clone_ [mutable, private] |
bool TAO_Notify_Event::is_on_heap_ [private] |
TAO_Notify_Property_Short TAO_Notify_Event::priority_ [protected] |
ACE_Time_Value TAO_Notify_Event::time_ [private] |
TAO_Notify_Property_Time TAO_Notify_Event::timeout_ [protected] |
1.7.0