Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions

bdlcc::TimeQueueItem< DATA > Class Template Reference

#include <bdlcc_timequeue.h>

List of all members.

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

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 Component bdlcc_timequeue


Member Typedef Documentation

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

Constructor & Destructor Documentation

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.

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.

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.

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

template<class DATA>
bdlcc::TimeQueueItem< DATA >::BSLMF_NESTED_TRAIT_DECLARATION ( TimeQueueItem< DATA >  ,
bslma::UsesBslmaAllocator   
)
template<class DATA>
TimeQueueItem& bdlcc::TimeQueueItem< DATA >::operator= ( const TimeQueueItem< DATA > &  rhs  ) 

Set the value of this TimeQueueItem to that of rhs.

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

Return the modifiable time value associated with this item.

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

Return the modifiable data instance associated with this item.

template<class DATA>
Handle& bdlcc::TimeQueueItem< DATA >::handle (  )  [inline]
template<class DATA>
Key& bdlcc::TimeQueueItem< DATA >::key (  ) 

Return the modifiable key value associated with this item.

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

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

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

Return the non-modifiable data associated with this item.

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

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

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

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


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