BloombergLP::bslalg::DequePrimitives_DequeMoveGuard

This class provides a guard object that, upon destruction and unless the release method has been called, uses moveBack or moveFront to move the "guarded" range [d_source_p .. d_source_p + d_size - 1] back to [d_destination_p .. d_destination_p + d_size -1].

Synopsis

Declared in <bslalg_dequeprimitives.h>

template<
    class VALUE_TYPE,
    int BLOCK_LENGTH>
class DequePrimitives_DequeMoveGuard;

Type Aliases

NameDescription
DequePrimitives This typedef is an alias for DequePrimitives.
Iterator This typedef is an alias to DequeIterator<VALUE_TYPE, BLOCK_LENGTH>.

Member Functions

NameDescription
DequePrimitives_DequeMoveGuard [constructor]Create a guard object that will call moveBack or moveFront, depending on the specified isFront, on the specified size elements from src to dest upon destruction unless release has been called.
~DequePrimitives_DequeMoveGuard [destructor]Call either moveBack or moveFront depending on d_front upon destruction unless release has been called before this.
release Set the size of the range guarded by this object to be zero.