summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Event.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Event.h')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Event.h58
1 files changed, 47 insertions, 11 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Event.h b/TAO/orbsvcs/orbsvcs/Notify/Event.h
index bbe45c870e3..c232eb8bafb 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Event.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Event.h
@@ -20,6 +20,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Copy_Disabled.h"
+#include "ace/Refcounted_Auto_Ptr.h"
#include "orbsvcs/Event_ForwarderS.h"
#include "orbsvcs/CosNotifyFilterC.h"
#include "orbsvcs/CosNotificationC.h"
@@ -44,6 +45,9 @@ public:
/// Destructor
virtual ~TAO_NS_Event ();
+ /// Copy the event.
+ virtual TAO_NS_Event* copy (ACE_ENV_SINGLE_ARG_DECL) const = 0;
+
/// Translate Any to Structured
static void translate (const CORBA::Any& any, CosNotification::StructuredEvent& notification);
@@ -54,32 +58,32 @@ public:
virtual const TAO_NS_EventType& type (void) const = 0;
/// Returns true if the filter matches.
- virtual CORBA::Boolean do_match (CosNotifyFilter::Filter_ptr filter ACE_ENV_ARG_DECL) = 0;
+ virtual CORBA::Boolean do_match (CosNotifyFilter::Filter_ptr filter ACE_ENV_ARG_DECL) const = 0;
/// Convert to CosNotification::Structured type
- virtual void convert (CosNotification::StructuredEvent& notification) = 0;
+ virtual void convert (CosNotification::StructuredEvent& notification) const = 0;
/// Push event to consumer
virtual void push (TAO_NS_Consumer* consumer ACE_ENV_ARG_DECL) const = 0;
/// Push event to the Event_Forwarder interface
- virtual void push (Event_Forwarder::StructuredProxyPushSupplier_ptr forwarder ACE_ENV_ARG_DECL) = 0;
+ virtual void push (Event_Forwarder::StructuredProxyPushSupplier_ptr forwarder ACE_ENV_ARG_DECL) const = 0;
/// Push event to the Event_Forwarder interface
- virtual void push_no_filtering (Event_Forwarder::StructuredProxyPushSupplier_ptr forwarder ACE_ENV_ARG_DECL) = 0;
+ virtual void push_no_filtering (Event_Forwarder::StructuredProxyPushSupplier_ptr forwarder ACE_ENV_ARG_DECL) const = 0;
/// Push event to the Event_Forwarder interface
- virtual void push (Event_Forwarder::ProxyPushSupplier_ptr forwarder ACE_ENV_ARG_DECL) = 0;
+ virtual void push (Event_Forwarder::ProxyPushSupplier_ptr forwarder ACE_ENV_ARG_DECL) const = 0;
/// Push event to the Event_Forwarder interface
- virtual void push_no_filtering (Event_Forwarder::ProxyPushSupplier_ptr forwarder ACE_ENV_ARG_DECL) = 0;
+ virtual void push_no_filtering (Event_Forwarder::ProxyPushSupplier_ptr forwarder ACE_ENV_ARG_DECL) const = 0;
///= Accessors
/// Priority
- TAO_NS_Property_Short& priority (void);
+ const TAO_NS_Property_Short& priority (void) const;
/// Timeout
- TAO_NS_Property_Time& timeout (void);
+ const TAO_NS_Property_Time& timeout (void) const;
protected:
/// = QoS properties
@@ -91,9 +95,41 @@ protected:
TAO_NS_Property_Time timeout_;
};
-template <class X, class ACE_LOCK> class ACE_Refcounted_Auto_Ptr;
-template <class T> class ACE_Unbounded_Queue;
-typedef ACE_Refcounted_Auto_Ptr<TAO_NS_Event, TAO_SYNCH_MUTEX> TAO_NS_Event_var;
+typedef ACE_Refcounted_Auto_Ptr<const TAO_NS_Event, TAO_SYNCH_MUTEX> TAO_NS_Event_var_Base;
+
+/**
+ * @class TAO_NS_Event_var
+ *
+ * @brief A Non-Copy version of the ACE_Refcounted_Auto_Ptr that hides the constructors.
+ *
+ */
+class TAO_NS_Event_var : public TAO_NS_Event_var_Base
+{
+public:
+ /// Default Constructor
+ TAO_NS_Event_var (void);
+
+protected:
+ /// Constructor
+ TAO_NS_Event_var (TAO_NS_Event* event);
+};
+
+/**
+ * @class TAO_NS_Event
+ *
+ * @brief A version of the ACE_Refcounted_Auto_Ptr that allows construction from a TAO_NS_Event
+ *
+ */
+class TAO_NS_Event_Copy_var : public TAO_NS_Event_var
+{
+public:
+ /// Default Constructor
+ TAO_NS_Event_Copy_var (void);
+
+ /// Constructor
+ TAO_NS_Event_Copy_var (TAO_NS_Event* event);
+};
+
typedef ACE_Unbounded_Queue<TAO_NS_Event_var> TAO_NS_Event_Collection;
#if defined (__ACE_INLINE__)