summaryrefslogtreecommitdiff
path: root/TAO/tao/Queued_Message.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-24 08:02:58 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-24 08:02:58 +0000
commite588f487fe14b34a642a62bd0cb53877a42b4793 (patch)
tree8c0bc2f7aa508472a4fd98dfca9d6afd60130f52 /TAO/tao/Queued_Message.cpp
parentad7f2d4ae4273710073d841fe5afccaf14e6718a (diff)
downloadATCD-e588f487fe14b34a642a62bd0cb53877a42b4793.tar.gz
ChangeLogTag:Tue Apr 24 00:21:54 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/Queued_Message.cpp')
-rw-r--r--TAO/tao/Queued_Message.cpp97
1 files changed, 97 insertions, 0 deletions
diff --git a/TAO/tao/Queued_Message.cpp b/TAO/tao/Queued_Message.cpp
new file mode 100644
index 00000000000..1cd30ae2e2e
--- /dev/null
+++ b/TAO/tao/Queued_Message.cpp
@@ -0,0 +1,97 @@
+// -*- C++ -*-
+// $Id$
+
+#include "Queued_Message.h"
+
+#if !defined (__ACE_INLINE__)
+# include "Queued_Message.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(tao, Queued_Message, "$Id$")
+
+TAO_Queued_Message::TAO_Queued_Message (void)
+ : connection_closed_ (0)
+ , send_failure_ (0)
+ , timeout_ (0)
+ , next_ (0)
+ , prev_ (0)
+{
+}
+
+TAO_Queued_Message::~TAO_Queued_Message (void)
+{
+}
+
+void
+TAO_Queued_Message::connection_closed (void)
+{
+ this->connection_closed_ = 1;
+}
+
+void
+TAO_Queued_Message::send_failure (void)
+{
+ this->send_failure_ = 1;
+}
+
+void
+TAO_Queued_Message::timeout (void)
+{
+ this->timeout_ = 1;
+}
+
+void
+TAO_Queued_Message::remove_from_list (TAO_Queued_Message *&head,
+ TAO_Queued_Message *&tail)
+{
+ if (this->prev_ != 0)
+ this->prev_->next_ = this->next_;
+ else
+ head = this->next_;
+
+ if (this->next_ != 0)
+ this->next_->prev_ = this->prev_;
+ else
+ tail = this->prev_;
+
+ this->next_ = 0;
+ this->prev_ = 0;
+}
+
+void
+TAO_Queued_Message::push_back (TAO_Queued_Message *&head,
+ TAO_Queued_Message *&tail)
+{
+ if (tail == 0)
+ {
+ tail = this;
+ head = this;
+ this->next_ = 0;
+ this->prev_ = 0;
+ return;
+ }
+
+ tail->next_ = this;
+ this->prev_ = tail;
+ this->next_ = 0;
+ tail = this;
+}
+
+void
+TAO_Queued_Message::push_front (TAO_Queued_Message *&head,
+ TAO_Queued_Message *&tail)
+{
+ if (head == 0)
+ {
+ tail = this;
+ head = this;
+ this->next_ = 0;
+ this->prev_ = 0;
+ return;
+ }
+
+ head->prev_ = this;
+ this->next_ = head;
+ this->prev_ = 0;
+ head = this;
+}