summaryrefslogtreecommitdiff
path: root/ace/Synch_Options.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-10-21 21:41:34 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-10-21 21:41:34 +0000
commita5fdebc5f6375078ec1763850a4ca23ec7fe6458 (patch)
treebcf0a25c3d45a209a6e3ac37b233a4812f29c732 /ace/Synch_Options.cpp
downloadATCD-a5fdebc5f6375078ec1763850a4ca23ec7fe6458.tar.gz
Initial revision
Diffstat (limited to 'ace/Synch_Options.cpp')
-rw-r--r--ace/Synch_Options.cpp93
1 files changed, 93 insertions, 0 deletions
diff --git a/ace/Synch_Options.cpp b/ace/Synch_Options.cpp
new file mode 100644
index 00000000000..738d02493b1
--- /dev/null
+++ b/ace/Synch_Options.cpp
@@ -0,0 +1,93 @@
+// Synch_Options.cpp
+// $Id$
+
+#define ACE_BUILD_DLL
+#include "ace/Synch_Options.h"
+
+ACE_ALLOC_HOOK_DEFINE(ACE_Synch_Options)
+
+void
+ACE_Synch_Options::dump (void) const
+{
+ ACE_TRACE ("ACE_Synch_Options::dump");
+}
+
+// Static initialization.
+
+/* static */
+ACE_Synch_Options ACE_Synch_Options::defaults;
+
+/* static */
+ACE_Synch_Options ACE_Synch_Options::synch;
+
+/* static */
+ACE_Synch_Options ACE_Synch_Options::asynch (ACE_Synch_Options::USE_REACTOR);
+
+ACE_Synch_Options::ACE_Synch_Options (u_long options,
+ const ACE_Time_Value &timeout,
+ const void *arg)
+{
+ ACE_TRACE ("ACE_Synch_Options::ACE_Synch_Options");
+ this->set (options, timeout, arg);
+}
+
+void
+ACE_Synch_Options::set (u_long options,
+ const ACE_Time_Value &timeout,
+ const void *arg)
+{
+ ACE_TRACE ("ACE_Synch_Options::set");
+ this->options_ = options;
+ this->timeout_ = (ACE_Time_Value &) timeout;
+ this->arg_ = arg;
+}
+
+int
+ACE_Synch_Options::operator[] (u_long option) const
+{
+ ACE_TRACE ("ACE_Synch_Options::operator[]");
+ return (this->options_ & option) != 0;
+}
+
+void
+ACE_Synch_Options::operator= (u_long option)
+{
+ ACE_TRACE ("ACE_Synch_Options::operator=");
+ this->options_ |= option;
+}
+
+const ACE_Time_Value &
+ACE_Synch_Options::timeout (void) const
+{
+ ACE_TRACE ("ACE_Synch_Options::timeout");
+ return this->timeout_;
+}
+
+void
+ACE_Synch_Options::timeout (ACE_Time_Value &tv)
+{
+ ACE_TRACE ("ACE_Synch_Options::timeout");
+ this->timeout_ = tv;
+}
+
+const ACE_Time_Value *
+ACE_Synch_Options::time_value (void) const
+{
+ ACE_TRACE ("ACE_Synch_Options::time_value");
+ return (*this)[USE_TIMEOUT] ? &this->timeout_ : 0;
+}
+
+const void *
+ACE_Synch_Options::arg (void) const
+{
+ ACE_TRACE ("ACE_Synch_Options::arg");
+ return this->arg_;
+}
+
+void
+ACE_Synch_Options::arg (const void *a)
+{
+ ACE_TRACE ("ACE_Synch_Options::arg");
+ this->arg_ = a;
+}
+