Guard that reverses a deque move on destruction unless released.

Synopsis

Declared in <bslalg_dequeprimitives.h>

template<
    class VALUE_TYPE,
    int BLOCK_LENGTH>
class DequePrimitives_DequeMoveGuard;

Description

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].

Type Aliases

Name

Description

DequePrimitives

Alias for the DequePrimitives utilities used by this guard.

Iterator

Iterator type used by the guarded move operation.

Member Functions

Name

Description

DequePrimitives_DequeMoveGuard [constructor]

Create a guard that reverses a move unless release is 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.

Created with MrDocs