summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
Diffstat (limited to 'ace')
-rw-r--r--ace/Strategies.cpp57
-rw-r--r--ace/Strategies.h23
2 files changed, 72 insertions, 8 deletions
diff --git a/ace/Strategies.cpp b/ace/Strategies.cpp
index 0943d560b2c..576faa6ee2b 100644
--- a/ace/Strategies.cpp
+++ b/ace/Strategies.cpp
@@ -20,6 +20,30 @@ ACE_Notification_Strategy::~ACE_Notification_Strategy (void)
{
}
+ACE_Event_Handler *
+ACE_Notification_Strategy::event_handler (void)
+{
+ return eh_;
+}
+
+void
+ACE_Notification_Strategy::event_handler (ACE_Event_Handler *eh)
+{
+ this->eh_ = eh;
+}
+
+ACE_Reactor_Mask
+ACE_Notification_Strategy::mask (void)
+{
+ return mask_;
+}
+
+void
+ACE_Notification_Strategy::mask (ACE_Reactor_Mask m)
+{
+ this->mask_ = m;
+}
+
ACE_Reactor_Notification_Strategy::ACE_Reactor_Notification_Strategy (ACE_Reactor *reactor,
ACE_Event_Handler *eh,
ACE_Reactor_Mask mask)
@@ -41,25 +65,50 @@ ACE_Reactor_Notification_Strategy::notify (ACE_Event_Handler *eh,
return this->reactor_->notify (eh, mask);
}
-ACE_ReactorEx_Notification_Strategy::ACE_ReactorEx_Notification_Strategy (ACE_ReactorEx *reactorex,
+ACE_Reactor *
+ACE_Reactor_Notification_Strategy::reactor (void)
+{
+ return this->reactor_;
+}
+
+void
+ACE_Reactor_Notification_Strategy::reactor (ACE_Reactor *r)
+{
+ this->reactor_ = r;
+}
+
+ACE_ReactorEx_Notification_Strategy::ACE_ReactorEx_Notification_Strategy (ACE_ReactorEx *reactorEx,
ACE_Event_Handler *eh,
ACE_Reactor_Mask mask)
: ACE_Notification_Strategy (eh, mask),
- reactorex_ (reactorex)
+ reactorEx_ (reactorEx)
{
}
int
ACE_ReactorEx_Notification_Strategy::notify (void)
{
- return this->reactorex_->notify (this->eh_, this->mask_);
+ return this->reactorEx_->notify (this->eh_, this->mask_);
}
int
ACE_ReactorEx_Notification_Strategy::notify (ACE_Event_Handler *eh,
ACE_Reactor_Mask mask)
{
- return this->reactorex_->notify (eh, mask);
+ return this->reactorEx_->notify (eh, mask);
}
+ACE_ReactorEx *
+ACE_ReactorEx_Notification_Strategy::reactorEx (void)
+{
+ return this->reactorEx_;
+}
+
+void
+ACE_ReactorEx_Notification_Strategy::reactorEx (ACE_ReactorEx *r)
+{
+ this->reactorEx_ = r;
+}
+
#endif /* ACE_STRATEGIES_C */
+
diff --git a/ace/Strategies.h b/ace/Strategies.h
index 07fc604be90..0c16b0bbbe1 100644
--- a/ace/Strategies.h
+++ b/ace/Strategies.h
@@ -41,6 +41,13 @@ public:
virtual int notify (ACE_Event_Handler *,
ACE_Reactor_Mask mask) = 0;
+ // Get/Set the event handler
+ ACE_Event_Handler *event_handler (void);
+ void event_handler (ACE_Event_Handler *eh);
+
+ // Get/Set the reactor mask
+ ACE_Reactor_Mask mask (void);
+ void mask (ACE_Reactor_Mask m);
protected:
ACE_Event_Handler *eh_;
@@ -65,7 +72,11 @@ public:
virtual int notify (ACE_Event_Handler *,
ACE_Reactor_Mask mask);
-private:
+ // Get/Set the reactor
+ ACE_Reactor *reactor (void);
+ void reactor (ACE_Reactor *r);
+
+protected:
ACE_Reactor *reactor_;
};
@@ -78,7 +89,7 @@ class ACE_Export ACE_ReactorEx_Notification_Strategy : public ACE_Notification_S
// ACE_ReactorEx::notify() method.
{
public:
- ACE_ReactorEx_Notification_Strategy (ACE_ReactorEx *reactorex,
+ ACE_ReactorEx_Notification_Strategy (ACE_ReactorEx *reactorEx,
ACE_Event_Handler *eh,
ACE_Reactor_Mask mask);
@@ -87,8 +98,12 @@ public:
virtual int notify (ACE_Event_Handler *,
ACE_Reactor_Mask mask);
-private:
- ACE_ReactorEx *reactorex_;
+ // Get/Set the reactorEx
+ ACE_ReactorEx *reactorEx (void);
+ void reactorEx (ACE_ReactorEx *r);
+
+protected:
+ ACE_ReactorEx *reactorEx_;
};
// This needs to come here to avoid circular dependencies.