diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-18 21:59:11 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-18 21:59:11 +0000 |
commit | 367187492835b4f709d17962af0dff632b1ce65f (patch) | |
tree | 5ae951cd59471c77378c51c13787592714426693 /ace/Timer_Hash_T.cpp | |
parent | 90ba20ad4c88453745b74e03bf466e8357be7b80 (diff) | |
download | ATCD-367187492835b4f709d17962af0dff632b1ce65f.tar.gz |
Added pure virtual get_first() method to Timer_Queue_T. Added
implementations to Timer_Wheel and Timer_Hash. Timer_Heap and Timer_List
already had implementations.
Diffstat (limited to 'ace/Timer_Hash_T.cpp')
-rw-r--r-- | ace/Timer_Hash_T.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ace/Timer_Hash_T.cpp b/ace/Timer_Hash_T.cpp index 01bfca7b90a..2db6451c8e5 100644 --- a/ace/Timer_Hash_T.cpp +++ b/ace/Timer_Hash_T.cpp @@ -434,6 +434,20 @@ ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::remove_first (void) } +// Returns the earliest node without removing it + +template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> ACE_Timer_Node_T<TYPE> * +ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::get_first (void) +{ + ACE_TRACE ("ACE_Timer_Hash_T::get_first"); + + if (this->is_empty ()) + return 0; + + return this->table_[this->earliest_position_]->get_first (); +} + + // Dummy version of expire to get rid of warnings in Sun CC 4.2 template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> int |