BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlcc::TimeQueueItem< DATA > Class Template Reference

#include <bdlcc_timequeue.h>

Public Types

typedef TimeQueue< DATA >::Handle Handle
 
typedef TimeQueue< DATA >::Key Key
 

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (TimeQueueItem, bslma::UsesBslmaAllocator)
 
 TimeQueueItem (bslma::Allocator *basicAllocator=0)
 
 TimeQueueItem (const bsls::TimeInterval &time, const DATA &data, Handle handle, bslma::Allocator *basicAllocator=0)
 
 TimeQueueItem (const bsls::TimeInterval &time, const DATA &data, Handle handle, const Key &key, bslma::Allocator *basicAllocator=0)
 
 TimeQueueItem (const TimeQueueItem< DATA > &original, bslma::Allocator *basicAllocator=0)
 
TimeQueueItemoperator= (const TimeQueueItem< DATA > &rhs)
 Set the value of this TimeQueueItem to that of rhs.
 
bsls::TimeIntervaltime ()
 Return the modifiable time value associated with this item.
 
DATA & data ()
 Return the modifiable data instance associated with this item.
 
Handlehandle ()
 Return the modifiable handle value associated with this item.
 
Keykey ()
 Return the modifiable key value associated with this item.
 
const bsls::TimeIntervaltime () const
 Return the non-modifiable time value associated with this item.
 
const DATA & data () const
 Return the non-modifiable data associated with this item.
 
Handle handle () const
 Return the non-modifiable handle value associated with this item.
 
const Keykey () const
 Return the non-modifiable key value associated with this item.
 

Detailed Description

template<class DATA>
class bdlcc::TimeQueueItem< DATA >

This parameterized structure holds a time, data and associated handle. This structure is used in the interface of TimeQueue<DATA> to provide thread-safe access to individual elements on the queue. Note that DATA must be default-constructible.

See bdlcc_timequeue

Member Typedef Documentation

◆ Handle

template<class DATA >
typedef TimeQueue<DATA>::Handle bdlcc::TimeQueueItem< DATA >::Handle

◆ Key

template<class DATA >
typedef TimeQueue<DATA>::Key bdlcc::TimeQueueItem< DATA >::Key

Constructor & Destructor Documentation

◆ TimeQueueItem() [1/4]

template<class DATA >
bdlcc::TimeQueueItem< DATA >::TimeQueueItem ( bslma::Allocator basicAllocator = 0)
explicit

Create an empty time queue item. Optionally specify a basicAllocator used to supply memory. If basicAllocator is zero, then use the currently installed default allocator.

◆ TimeQueueItem() [2/4]

template<class DATA >
bdlcc::TimeQueueItem< DATA >::TimeQueueItem ( const bsls::TimeInterval time,
const DATA &  data,
Handle  handle,
bslma::Allocator basicAllocator = 0 
)

Create time queue item holding a copy of the specified data, with the specified associated time and handle information. Optionally specify a basicAllocator used to supply memory. If basicAllocator is zero, then use the currently installed default allocator.

◆ TimeQueueItem() [3/4]

template<class DATA >
bdlcc::TimeQueueItem< DATA >::TimeQueueItem ( const bsls::TimeInterval time,
const DATA &  data,
Handle  handle,
const Key key,
bslma::Allocator basicAllocator = 0 
)

Create time queue item holding a copy of the specified data, with the specified associated time, handle, and key information. Optionally specify a basicAllocator used to supply memory. If basicAllocator is zero, then use the currently installed default allocator.

◆ TimeQueueItem() [4/4]

template<class DATA >
bdlcc::TimeQueueItem< DATA >::TimeQueueItem ( const TimeQueueItem< DATA > &  original,
bslma::Allocator basicAllocator = 0 
)

Create a copy of the specified original time queue item. Optionally specify a basicAllocator used to supply memory. If basicAllocator is zero, then use the currently installed default allocator.

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION()

template<class DATA >
bdlcc::TimeQueueItem< DATA >::BSLMF_NESTED_TRAIT_DECLARATION ( TimeQueueItem< DATA >  ,
bslma::UsesBslmaAllocator   
)

◆ data() [1/2]

template<class DATA >
DATA & bdlcc::TimeQueueItem< DATA >::data ( )
inline

◆ data() [2/2]

template<class DATA >
const DATA & bdlcc::TimeQueueItem< DATA >::data ( ) const
inline

◆ handle() [1/2]

template<class DATA >
Handle & bdlcc::TimeQueueItem< DATA >::handle ( )
inline

◆ handle() [2/2]

template<class DATA >
Handle bdlcc::TimeQueueItem< DATA >::handle ( ) const
inline

◆ key() [1/2]

template<class DATA >
TimeQueueItem< DATA >::Key & bdlcc::TimeQueueItem< DATA >::key ( )
inline

◆ key() [2/2]

template<class DATA >
const TimeQueueItem< DATA >::Key & bdlcc::TimeQueueItem< DATA >::key ( ) const
inline

◆ operator=()

template<class DATA >
TimeQueueItem< DATA > & bdlcc::TimeQueueItem< DATA >::operator= ( const TimeQueueItem< DATA > &  rhs)
inline

◆ time() [1/2]

template<class DATA >
bsls::TimeInterval & bdlcc::TimeQueueItem< DATA >::time ( )
inline

◆ time() [2/2]

template<class DATA >
const bsls::TimeInterval & bdlcc::TimeQueueItem< DATA >::time ( ) const
inline

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