BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlcc::TimeQueueItem< DATA > Class Template Reference

#include <bdlcc_timequeue.h>

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
Note that DATA must be default-constructible.

See bdlcc_timequeue

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)
 
bsls::TimeIntervaltime ()
 
DATA & data ()
 
Handlehandle ()
 
Keykey ()
 
const bsls::TimeIntervaltime () const
 
const DATA & data () const
 
Handle handle () const
 
const Keykey () const
 

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

Return the modifiable data instance associated with this item.

◆ data() [2/2]

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

Return the non-modifiable data associated with this item.

◆ handle() [1/2]

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

Return the modifiable handle value associated with this item.

◆ handle() [2/2]

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

Return the non-modifiable handle value associated with this item.

◆ key() [1/2]

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

Return the modifiable key value associated with this item.

◆ key() [2/2]

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

Return the non-modifiable key value associated with this item.

◆ operator=()

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

Set the value of this TimeQueueItem to that of rhs.

◆ time() [1/2]

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

Return the modifiable time value associated with this item.

◆ time() [2/2]

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

Return the non-modifiable time value associated with this item.


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