Task_Ex_T.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: Task_Ex_T.inl 80826 2008-03-04 14:51:23Z wotte $
00004 
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE void
00008 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd,
00009                                     size_t wm_size)
00010 {
00011   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::water_marks");
00012   if (cmd == ACE_IO_Cntl_Msg::SET_LWM)
00013     this->msg_queue_->low_water_mark (wm_size);
00014   else /* cmd == ACE_IO_Cntl_Msg::SET_HWM */
00015     this->msg_queue_->high_water_mark (wm_size);
00016 }
00017 
00018 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE int
00019 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::getq (ACE_MESSAGE_TYPE *&mb, ACE_Time_Value *tv)
00020 {
00021   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::getq");
00022   return this->msg_queue_->dequeue_head (mb, tv);
00023 }
00024 
00025 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE int
00026 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::can_put (ACE_MESSAGE_TYPE *)
00027 {
00028   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::can_put");
00029   ACE_NOTSUP_RETURN (-1);
00030 }
00031 
00032 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE int
00033 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::putq (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv)
00034 {
00035   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::putq");
00036   return this->msg_queue_->enqueue_tail (mb, tv);
00037 }
00038 
00039 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE int
00040 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::ungetq (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv)
00041 {
00042   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::ungetq");
00043   return this->msg_queue_->enqueue_head (mb, tv);
00044 }
00045 
00046 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE int
00047 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::flush (u_long flag)
00048 {
00049   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::flush");
00050   if (ACE_BIT_ENABLED (flag, ACE_Task_Flags::ACE_FLUSHALL))
00051     return this->msg_queue_ != 0 && this->msg_queue_->close ();
00052   else
00053     return -1;   // Note, need to be more careful about what we free...
00054 }
00055 
00056 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE void
00057 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::msg_queue (ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE> *mq)
00058 {
00059   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::msg_queue");
00060   if (this->delete_msg_queue_)
00061     {
00062       delete this->msg_queue_;
00063       this->delete_msg_queue_ = false;
00064     }
00065   this->msg_queue_ = mq;
00066 }
00067 
00068 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE> *
00069 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::msg_queue (void)
00070 {
00071   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::msg_queue");
00072   return this->msg_queue_;
00073 }
00074 
00075 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE int
00076 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::reply (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv)
00077 {
00078   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::reply");
00079   ACE_UNUSED_ARG (mb);
00080   ACE_UNUSED_ARG (tv);
00081   return -1 ; // this->sibling ()->put_next (mb, tv);
00082 }
00083 
00084 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE ACE_Task<ACE_SYNCH_USE> *
00085 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::next (void)
00086 {
00087   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::next");
00088   return this->next_;
00089 }
00090 
00091 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE void
00092 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::next (ACE_Task<ACE_SYNCH_USE> *q)
00093 {
00094   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::next");
00095   this->next_ = q;
00096 }
00097 
00098 // Transfer msg to the next ACE_Task_Ex.
00099 
00100 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE> ACE_INLINE int
00101 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::put_next (
00102   ACE_MESSAGE_TYPE * /* msg */,
00103   ACE_Time_Value * /* tv */)
00104 {
00105   ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE>::put_next");
00106   return  -1; // this->next_ == 0 ? -1 : this->next_->put (msg, tv);
00107 }
00108 
00109 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:18:43 2010 for ACE by  doxygen 1.4.7