Queued_Message.cpp

Go to the documentation of this file.
00001 // $Id: Queued_Message.cpp 80306 2007-12-18 12:10:07Z johnnyw $
00002 
00003 #include "tao/Queued_Message.h"
00004 
00005 #if !defined (__ACE_INLINE__)
00006 # include "tao/Queued_Message.inl"
00007 #endif /* __ACE_INLINE__ */
00008 
00009 ACE_RCSID (tao,
00010            Queued_Message,
00011            "$Id: Queued_Message.cpp 80306 2007-12-18 12:10:07Z johnnyw $")
00012 
00013 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00014 
00015 TAO_Queued_Message::TAO_Queued_Message (TAO_ORB_Core *oc,
00016                                         ACE_Allocator *alloc,
00017                                         bool is_heap_allocated)
00018   : allocator_ (alloc)
00019   , is_heap_created_ (is_heap_allocated)
00020   , orb_core_ (oc)
00021   , next_ (0)
00022   , prev_ (0)
00023 {
00024 }
00025 
00026 TAO_Queued_Message::~TAO_Queued_Message (void)
00027 {
00028 }
00029 
00030 void
00031 TAO_Queued_Message::remove_from_list (TAO_Queued_Message *&head,
00032                                       TAO_Queued_Message *&tail)
00033 {
00034   if (this->prev_ != 0)
00035     {
00036       this->prev_->next_ = this->next_;
00037     }
00038   else if(head == this)
00039     {
00040       head = this->next_;
00041     }
00042 
00043   if (this->next_ != 0)
00044     {
00045       this->next_->prev_ = this->prev_;
00046     }
00047   else if(tail == this)
00048     {
00049       tail = this->prev_;
00050     }
00051 
00052   this->next_ = 0;
00053   this->prev_ = 0;
00054 }
00055 
00056 void
00057 TAO_Queued_Message::push_back (TAO_Queued_Message *&head,
00058                                TAO_Queued_Message *&tail)
00059 {
00060   if (tail == 0)
00061     {
00062       tail = this;
00063       head = this;
00064       this->next_ = 0;
00065       this->prev_ = 0;
00066     }
00067   else
00068     {
00069       tail->next_ = this;
00070       this->prev_ = tail;
00071       this->next_ = 0;
00072       tail = this;
00073     }
00074 }
00075 
00076 void
00077 TAO_Queued_Message::push_front (TAO_Queued_Message *&head,
00078                                 TAO_Queued_Message *&tail)
00079 {
00080   if (head == 0)
00081     {
00082       tail = this;
00083       head = this;
00084       this->next_ = 0;
00085       this->prev_ = 0;
00086     }
00087   else
00088     {
00089       head->prev_ = this;
00090       this->next_ = head;
00091       this->prev_ = 0;
00092       head = this;
00093     }
00094 }
00095 
00096 bool
00097 TAO_Queued_Message::is_expired (const ACE_Time_Value &) const
00098 {
00099   return false;
00100 }
00101 
00102 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:37:52 2010 for TAO by  doxygen 1.4.7