ACE 8.0.1
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ACE_Countdown_Time_T< TIME_POLICY > Class Template Reference

#include <Countdown_Time_T.h>

Inheritance diagram for ACE_Countdown_Time_T< TIME_POLICY >:
Inheritance graph
[legend]
Collaboration diagram for ACE_Countdown_Time_T< TIME_POLICY >:
Collaboration graph
[legend]

Public Member Functions

 ACE_Countdown_Time_T (ACE_Time_Value *max_wait_time, TIME_POLICY const &time_policy=TIME_POLICY())
 Cache the max_wait_time and call start().
 
 ~ACE_Countdown_Time_T ()
 
void start ()
 Cache the current time and enter a start state.
 
void stop ()
 
void update ()
 
bool stopped () const
 Returns true if we've already been stopped, else false.
 
void set_time_policy (TIME_POLICY const &time_policy)
 

Private Attributes

TIME_POLICY time_policy_
 The policy to return the current time of day.
 
ACE_Time_Valuemax_wait_time_
 Maximum time we are monitoring.
 
ACE_Time_Value max_wait_value_
 Copy of the maximum time value, used to avoid nested decrements.
 
ACE_Time_Value start_time_
 Beginning of the start time.
 
bool stopped_
 Keeps track of whether we've already been stopped.
 

Additional Inherited Members

- Private Member Functions inherited from ACE_Copy_Disabled
 ACE_Copy_Disabled ()
 Default constructor.
 

Constructor & Destructor Documentation

◆ ACE_Countdown_Time_T()

template<typename TIME_POLICY >
ACE_Countdown_Time_T< TIME_POLICY >::ACE_Countdown_Time_T ( ACE_Time_Value * max_wait_time,
TIME_POLICY const & time_policy = TIME_POLICY() )
inline

Cache the max_wait_time and call start().

◆ ~ACE_Countdown_Time_T()

Destructor, makes sure the max_wait_time that got passed as pointer to the constructor is updated with the time elapsed.

Member Function Documentation

◆ set_time_policy()

template<typename TIME_POLICY >
void ACE_Countdown_Time_T< TIME_POLICY >::set_time_policy ( TIME_POLICY const & time_policy)
inline

Allows applications to control how the timer queue gets the time of day.

◆ start()

template<typename TIME_POLICY >
void ACE_Countdown_Time_T< TIME_POLICY >::start ( )
inline

Cache the current time and enter a start state.

◆ stop()

template<typename TIME_POLICY >
void ACE_Countdown_Time_T< TIME_POLICY >::stop ( )
inline

Subtract the elapsed time from max_wait_time_ and enter a stopped state.

◆ stopped()

template<typename TIME_POLICY >
bool ACE_Countdown_Time_T< TIME_POLICY >::stopped ( ) const
inline

Returns true if we've already been stopped, else false.

◆ update()

template<typename TIME_POLICY >
void ACE_Countdown_Time_T< TIME_POLICY >::update ( )
inline

Calls stop and then start. max_wait_time_ is modified by the call to stop.

Member Data Documentation

◆ max_wait_time_

template<typename TIME_POLICY = ACE_Default_Time_Policy>
ACE_Time_Value* ACE_Countdown_Time_T< TIME_POLICY >::max_wait_time_
private

Maximum time we are monitoring.

◆ max_wait_value_

template<typename TIME_POLICY = ACE_Default_Time_Policy>
ACE_Time_Value ACE_Countdown_Time_T< TIME_POLICY >::max_wait_value_
private

Copy of the maximum time value, used to avoid nested decrements.

◆ start_time_

template<typename TIME_POLICY = ACE_Default_Time_Policy>
ACE_Time_Value ACE_Countdown_Time_T< TIME_POLICY >::start_time_
private

Beginning of the start time.

◆ stopped_

template<typename TIME_POLICY = ACE_Default_Time_Policy>
bool ACE_Countdown_Time_T< TIME_POLICY >::stopped_
private

Keeps track of whether we've already been stopped.

◆ time_policy_

template<typename TIME_POLICY = ACE_Default_Time_Policy>
TIME_POLICY ACE_Countdown_Time_T< TIME_POLICY >::time_policy_
private

The policy to return the current time of day.


The documentation for this class was generated from the following files: