Quick Links: |
#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) | |
TimeQueueItem & | operator= (const TimeQueueItem< DATA > &rhs) |
bsls::TimeInterval & | time () |
DATA & | data () |
Handle & | handle () |
Key & | key () |
const bsls::TimeInterval & | time () const |
const DATA & | data () const |
Handle | handle () const |
const Key & | key () const |
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.
typedef TimeQueue<DATA>::Handle bdlcc::TimeQueueItem< DATA >::Handle |
typedef TimeQueue<DATA>::Key bdlcc::TimeQueueItem< DATA >::Key |
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.
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.
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.
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.
bdlcc::TimeQueueItem< DATA >::BSLMF_NESTED_TRAIT_DECLARATION | ( | TimeQueueItem< DATA > | , | |
bslma::UsesBslmaAllocator | ||||
) |
TimeQueueItem& bdlcc::TimeQueueItem< DATA >::operator= | ( | const TimeQueueItem< DATA > & | rhs | ) |
Set the value of this TimeQueueItem
to that of rhs
.
bsls::TimeInterval& bdlcc::TimeQueueItem< DATA >::time | ( | ) |
Return the modifiable time value associated with this item.
DATA& bdlcc::TimeQueueItem< DATA >::data | ( | ) |
Return the modifiable data instance associated with this item.
Handle& bdlcc::TimeQueueItem< DATA >::handle | ( | ) | [inline] |
Key& bdlcc::TimeQueueItem< DATA >::key | ( | ) |
Return the modifiable key value associated with this item.
const bsls::TimeInterval& bdlcc::TimeQueueItem< DATA >::time | ( | ) | const |
Return the non-modifiable time value associated with this item.
const DATA& bdlcc::TimeQueueItem< DATA >::data | ( | ) | const |
Return the non-modifiable data associated with this item.
Handle bdlcc::TimeQueueItem< DATA >::handle | ( | ) | const [inline] |
< Return the non-modifiable handle value associated with this item.
const Key& bdlcc::TimeQueueItem< DATA >::key | ( | ) | const |
Return the non-modifiable key value associated with this item.