summaryrefslogtreecommitdiff
path: root/ACE/ace/Timer_List_T.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/Timer_List_T.h')
-rw-r--r--ACE/ace/Timer_List_T.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/ACE/ace/Timer_List_T.h b/ACE/ace/Timer_List_T.h
index d4ec800340e..8b387c04725 100644
--- a/ACE/ace/Timer_List_T.h
+++ b/ACE/ace/Timer_List_T.h
@@ -21,7 +21,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
// Forward declaration.
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
+template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY>
class ACE_Timer_List_T;
/**
@@ -32,12 +32,12 @@ class ACE_Timer_List_T;
* This is a generic iterator that can be used to visit every
* node of a timer queue.
*/
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
+template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY = ACE_Default_Time_Policy>
class ACE_Timer_List_Iterator_T
-: public ACE_Timer_Queue_Iterator_T <TYPE, FUNCTOR, ACE_LOCK>
+: public ACE_Timer_Queue_Iterator_T <TYPE>
{
public:
- typedef ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK> List;
+ typedef ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY> List;
/// Constructor.
ACE_Timer_List_Iterator_T (List& lst);
@@ -81,19 +81,19 @@ protected:
* ACE_Timer_Heap will perform substantially faster than the
* ACE_Timer_List.
*/
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_List_T : public ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>
+template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY = ACE_Default_Time_Policy>
+class ACE_Timer_List_T : public ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>
{
public:
/// Type of iterator
- typedef ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> Iterator;
+ typedef ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY> Iterator;
/// Iterator is a friend
- friend class ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>;
+ friend class ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>;
typedef ACE_Timer_Node_T<TYPE> Node;
/// Type inherited from
- typedef ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> Base;
+ typedef ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY> Base_Timer_Queue;
typedef ACE_Free_List<Node> FreeList;
// = Initialization and termination methods.
@@ -103,7 +103,8 @@ public:
* default FUNCTOR will be created. @a freelist is the freelist of
* timer nodes. If 0, then a default freelist will be created.
*/
- ACE_Timer_List_T (FUNCTOR* upcall_functor = 0, FreeList* freelist = 0);
+ ACE_Timer_List_T (FUNCTOR* upcall_functor = 0, FreeList* freelist = 0,
+ TIME_POLICY const & time_policy = TIME_POLICY());
/// Destructor
virtual ~ACE_Timer_List_T (void);
@@ -147,7 +148,7 @@ public:
int dont_call_handle_close = 1);
/// Returns a pointer to this ACE_Timer_Queue's iterator.
- virtual ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>& iter (void);
+ virtual ACE_Timer_Queue_Iterator_T<TYPE>& iter (void);
/// Removes the earliest node from the queue and returns it
virtual ACE_Timer_Node_T<TYPE>* remove_first (void);