diff options
author | bala <balanatarajan@users.noreply.github.com> | 2001-07-06 04:41:00 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2001-07-06 04:41:00 +0000 |
commit | a13a1180fc884a9ccb22299f29b4285879739028 (patch) | |
tree | 3874c3e46e81a1a1c5a6c459720e1c17cab62da2 /TAO/tao/Incoming_Message_Queue.inl | |
parent | f808d5a4f39c81e8f0c90723d2b710c09e07b049 (diff) | |
download | ATCD-a13a1180fc884a9ccb22299f29b4285879739028.tar.gz |
ChangeLogTag: Thu Jul 5 23:30:07 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Incoming_Message_Queue.inl')
-rw-r--r-- | TAO/tao/Incoming_Message_Queue.inl | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/TAO/tao/Incoming_Message_Queue.inl b/TAO/tao/Incoming_Message_Queue.inl new file mode 100644 index 00000000000..8d270b9c479 --- /dev/null +++ b/TAO/tao/Incoming_Message_Queue.inl @@ -0,0 +1,78 @@ +// -*- C++ -*- +//$Id$ +ACE_INLINE CORBA::ULong +TAO_Incoming_Message_Queue::queue_length (void) +{ + return this->size_; +} + +ACE_INLINE int +TAO_Incoming_Message_Queue::is_tail_complete (void) +{ + // If the size is 0 return -1 + if (this->size_ == 0) + return -1; + + if (this->size_ && + this->queued_data_->missing_data_ == 0) + return 1; + + return 0; +} + +ACE_INLINE int +TAO_Incoming_Message_Queue::is_head_complete (void) +{ + if (this->size_ == 0) + return -1; + + if (this->size_ && + this->queued_data_->next_->missing_data_ == 0) + return 1; + + return 0; +} + +ACE_INLINE size_t +TAO_Incoming_Message_Queue::missing_data_tail (void) const +{ + if (this->size_ != 0) + return this->queued_data_->missing_data_; + + return 0; +} + + + +ACE_INLINE TAO_Queued_Data * +TAO_Incoming_Message_Queue::get_node (void) +{ + return TAO_Queued_Data::get_queued_data (); +} + + +/************************************************************************/ +// Methods for TAO_Queued_Data +/************************************************************************/ +/*static*/ +ACE_INLINE TAO_Queued_Data * +TAO_Queued_Data::get_queued_data (void) +{ + // @@TODO: Use the global pool for allocationg... + TAO_Queued_Data *qd = 0; + ACE_NEW_RETURN (qd, + TAO_Queued_Data, + 0); + + return qd; +} + +/*static*/ +ACE_INLINE void +TAO_Queued_Data::release (TAO_Queued_Data *qd) +{ + ACE_Message_Block::release (qd->msg_block_); + + // @@TODO: Use the global pool for releasing.. + delete qd; +} |