BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslalg::DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR > Class Template Reference

#include <bslalg_dequeprimitives.h>

Public Types

typedef DequeIterator< VALUE_TYPE, BLOCK_LENGTH > Iterator
 

Public Member Functions

 DequePrimitives_DequeElementGuard (const Iterator &begin, const Iterator &end, ALLOCATOR allocator)
 
 ~DequePrimitives_DequeElementGuard ()
 
IteratormoveBegin (std::ptrdiff_t offset=-1)
 
IteratormoveEnd (std::ptrdiff_t offset=1)
 
void release ()
 

Detailed Description

template<class VALUE_TYPE, int BLOCK_LENGTH, class ALLOCATOR>
class bslalg::DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >

This class provides a specialized proctor object that, upon destruction and unless the release method has been called, destroys the elements in a segment of a deque of parameterized VALUE_TYPE. The elements destroyed are delimited by the "guarded" range [d_begin .. d_end).

See bslalg_dequeprimitives

Member Typedef Documentation

◆ Iterator

template<class VALUE_TYPE , int BLOCK_LENGTH, class ALLOCATOR >
typedef DequeIterator<VALUE_TYPE, BLOCK_LENGTH> bslalg::DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::Iterator

Constructor & Destructor Documentation

◆ DequePrimitives_DequeElementGuard()

template<class VALUE_TYPE , int BLOCK_LENGTH, class ALLOCATOR >
bslalg::DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::DequePrimitives_DequeElementGuard ( const Iterator begin,
const Iterator end,
ALLOCATOR  allocator 
)
inline

Create a deque exception guard object for the sequence of elements of the parameterized VALUE_TYPE delimited by the specified range [begin .. end). The behavior is undefined unless begin <= end and unless each element in the range [begin .. end) has been initialized.

◆ ~DequePrimitives_DequeElementGuard()

template<class VALUE_TYPE , int BLOCK_LENGTH, class ALLOCATOR >
bslalg::DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::~DequePrimitives_DequeElementGuard ( )
inline

Call the destructor on each of the elements of the parameterized VALUE_TYPE delimited by the range [begin .. end) and destroy this array exception guard.

Member Function Documentation

◆ moveBegin()

template<class VALUE_TYPE , int BLOCK_LENGTH, class ALLOCATOR >
DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::Iterator & bslalg::DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::moveBegin ( std::ptrdiff_t  offset = -1)
inline

Move the begin iterator by the specified offset, and return the new begin iterator.

◆ moveEnd()

template<class VALUE_TYPE , int BLOCK_LENGTH, class ALLOCATOR >
DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::Iterator & bslalg::DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::moveEnd ( std::ptrdiff_t  offset = 1)
inline

Move the end pointer by the specified offset, and return the new end pointer.

◆ release()

template<class VALUE_TYPE , int BLOCK_LENGTH, class ALLOCATOR >
void bslalg::DequePrimitives_DequeElementGuard< VALUE_TYPE, BLOCK_LENGTH, ALLOCATOR >::release ( )
inline

Set the range of elements guarded by this object to be empty. Note that d_begin == d_end following this operation, but the specific value is unspecified.


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