BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsl::vectorBase< VALUE_TYPE > Class Template Reference

#include <bslstl_vector.h>

Inheritance diagram for bsl::vectorBase< VALUE_TYPE >:
bsl::vector< char > bsl::vector< bdlb::NullableValue< balb::Choice1 > > bsl::vector< balb::Choice3 > bsl::vector< balb::Choice1 > bsl::vector< bsl::basic_string > bsl::vector< bdlb::NullableValue< Enumerated::Value > > bsl::vector< Enumerated::Value > bsl::vector< int > bsl::vector< double > bsl::vector< bsl::vector< char > > bsl::vector< bool > bsl::vector< bdlt::DatetimeTz > bsl::vector< balb::Sequence3 > bsl::vector< balb::CustomString > bsl::vector< bdlb::NullableValue< int > > bsl::vector< bdlb::NullableValue< double > > bsl::vector< bdlb::NullableValue< bsl::vector< char > > > bsl::vector< bdlb::NullableValue< bool > > bsl::vector< bdlb::NullableValue< bdlt::DatetimeTz > > bsl::vector< bdlb::NullableAllocatedValue< balb::Sequence3 > > bsl::vector< unsigned int > bsl::vector< unsigned char > bsl::vector< bdlb::NullableValue< unsigned int > > bsl::vector< bdlb::NullableValue< unsigned char > > bsl::vector< bdlb::NullableValue< balb::CustomInt > > bsl::vector< balb::CustomInt > bsl::vector< balcl::Option > bsl::vector< bsl::vector< int > > bsl::vector< CommandLine_SchemaData > bsl::vector< OptionValue > bsl::vector< CollectorEntry > bsl::vector< ball::Category * > bsl::vector< ball::ManagedAttribute > bsl::vector< RecordJsonFormatter_FieldFormatter * > bsl::vector< FieldStringFormatter > bsl::vector< const ball::Rule * > bsl::vector< ball::UserFieldValue > bsl::vector< const void * > bsl::vector< bdlb::NullableValue > bsl::vector< balm::MetricSampleGroup > bsl::vector< balst::StackTraceFrame > bsl::vector< ZoneinfoTransition > bsl::vector< WhitespaceType::Enum > bsl::vector< Element > bsl::vector< Attribute > bsl::vector< bsl::pair< bsl::string, int > > bsl::vector< bdlt::Date > bsl::vector< NodeType > bsl::vector< bdlbb::BlobBuffer > bsl::vector< bsl::uint64_t > bsl::vector< CompactedArray_CountedValue< TYPE > > bsl::vector< bsl::conjunction > bsl::vector< Node * > bsl::vector< bdlcc::StripedUnorderedContainerImpl_Bucket< KEY, VALUE > > bsl::vector< Json > bsl::vector< bdlma::ConcurrentFixedPool_Node * > bsl::vector< bdlcc::TimeQueueItem > bsl::vector< bsl::pair > bsl::vector< CompactedArray_CountedValue< bdlt::Timetable_Day > > bsl::vector< bdlt::Timetable_CompactableTransition > bsl::vector< void *, _M_node_ptr_allocator_type > bsl::vector< VALUE > bsl::vector< UintPtr, ImplAlloc > bsl::vector< ThreadUtil::Handle > bsl::vector< bslmt::ThroughputBenchmark::ThreadGroup > bsl::vector< bsl::vector< vector< double > > > bsl::vector< vector< double > > bsl::vector< s_baltst::BasicSchemaChoice > bsl::vector< s_baltst::BasicSchemaChoiceElementChoice > bsl::vector< s_baltst::BasicSchemaComplexTypeElementChoice > bsl::vector< s_baltst::BasicSchemaElementChoice > bsl::vector< s_baltst::BasicSchemaEnumerationElementChoice > bsl::vector< s_baltst::BasicSchemaRestrictionElementChoice > bsl::vector< s_baltst::BasicSchemaSequenceElementChoice > bsl::vector< s_baltst::BasicSchemaSimpleTypeElementChoice > bsl::vector< s_baltst::BasicRecord > bsl::vector< s_baltst::MySequenceWithChoiceArrayChoice > bsl::vector< bdlb::NullableValue< s_baltst::MySequenceWithNillableIntSequenceArraySequence > > bsl::vector< bdlb::NullableValue< bsl::basic_string > > bsl::vector< bdlb::NullableValue< s_baltst::MySequenceWithNillableStringSequenceArraySequence > > bsl::vector< bdlb::NullableValue< s_baltst::Choice1 > > bsl::vector< s_baltst::Choice3 > bsl::vector< s_baltst::Choice1 > bsl::vector< bdlb::NullableValue< s_baltst::CustomString > > bsl::vector< s_baltst::Enumerated::Value > bsl::vector< bdlb::NullableValue< s_baltst::Enumerated::Value > > bsl::vector< s_baltst::CustomString > bsl::vector< s_baltst::Sequence3 > bsl::vector< bdlb::NullableAllocatedValue< s_baltst::Sequence3 > > bsl::vector< s_baltst::CustomInt > bsl::vector< bdlb::NullableValue< s_baltst::CustomInt > > bsl::vector< VALUE_TYPE, ALLOCATOR >

Public Types

typedef VALUE_TYPE value_type
 
typedef VALUE_TYPE & reference
 
typedef VALUE_TYPE const & const_reference
 
typedef VALUE_TYPE * iterator
 
typedef VALUE_TYPE const * const_iterator
 
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef bsl::reverse_iterator< iteratorreverse_iterator
 
typedef bsl::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

 vectorBase ()
 Create an empty base object with no capacity.
 
void adopt (BloombergLP::bslmf::MovableRef< vectorBase > base)
 
iterator begin () BSLS_KEYWORD_NOEXCEPT
 
iterator end () BSLS_KEYWORD_NOEXCEPT
 
reverse_iterator rbegin () BSLS_KEYWORD_NOEXCEPT
 
reverse_iterator rend () BSLS_KEYWORD_NOEXCEPT
 
reference operator[] (size_type position)
 
reference at (size_type position)
 
reference front ()
 
reference back ()
 
VALUE_TYPE * data () BSLS_KEYWORD_NOEXCEPT
 
const_iterator begin () const BSLS_KEYWORD_NOEXCEPT
 
const_iterator cbegin () const BSLS_KEYWORD_NOEXCEPT
 
const_iterator end () const BSLS_KEYWORD_NOEXCEPT
 
const_iterator cend () const BSLS_KEYWORD_NOEXCEPT
 
const_reverse_iterator rbegin () const BSLS_KEYWORD_NOEXCEPT
 
const_reverse_iterator crbegin () const BSLS_KEYWORD_NOEXCEPT
 
const_reverse_iterator rend () const BSLS_KEYWORD_NOEXCEPT
 
const_reverse_iterator crend () const BSLS_KEYWORD_NOEXCEPT
 
size_type size () const BSLS_KEYWORD_NOEXCEPT
 Return the number of elements in this vector.
 
size_type capacity () const BSLS_KEYWORD_NOEXCEPT
 
bool empty () const BSLS_KEYWORD_NOEXCEPT
 Return true if this vector has size 0, and false otherwise.
 
const_reference operator[] (size_type position) const
 
const_reference at (size_type position) const
 
const_reference front () const
 
const_reference back () const
 
const VALUE_TYPE * data () const BSLS_KEYWORD_NOEXCEPT
 

Protected Attributes

VALUE_TYPE * d_dataBegin_p
 
VALUE_TYPE * d_dataEnd_p
 
std::size_t d_capacity
 

Detailed Description

template<class VALUE_TYPE>
class bsl::vectorBase< VALUE_TYPE >

This class describes the basic layout for a vector class, to be included into the vector layout before the allocator (provided by bslalg::ContainerBase) to take better advantage of cache prefetching. It is parameterized by VALUE_TYPE only, and implements the portion of vector that does not need to know about its (template parameter) type ALLOCATOR (in order to generate shorter debug strings). This class intentionally has no creators (other than the compiler-generated ones).

See bslstl_vector

Member Typedef Documentation

◆ const_iterator

template<class VALUE_TYPE >
typedef VALUE_TYPE const* bsl::vectorBase< VALUE_TYPE >::const_iterator

◆ const_reference

template<class VALUE_TYPE >
typedef VALUE_TYPE const& bsl::vectorBase< VALUE_TYPE >::const_reference

◆ const_reverse_iterator

template<class VALUE_TYPE >
typedef bsl::reverse_iterator<const_iterator> bsl::vectorBase< VALUE_TYPE >::const_reverse_iterator

◆ difference_type

template<class VALUE_TYPE >
typedef std::ptrdiff_t bsl::vectorBase< VALUE_TYPE >::difference_type

◆ iterator

template<class VALUE_TYPE >
typedef VALUE_TYPE* bsl::vectorBase< VALUE_TYPE >::iterator

◆ reference

template<class VALUE_TYPE >
typedef VALUE_TYPE& bsl::vectorBase< VALUE_TYPE >::reference

◆ reverse_iterator

template<class VALUE_TYPE >
typedef bsl::reverse_iterator<iterator> bsl::vectorBase< VALUE_TYPE >::reverse_iterator

◆ size_type

template<class VALUE_TYPE >
typedef std::size_t bsl::vectorBase< VALUE_TYPE >::size_type

◆ value_type

template<class VALUE_TYPE >
typedef VALUE_TYPE bsl::vectorBase< VALUE_TYPE >::value_type

Constructor & Destructor Documentation

◆ vectorBase()

template<class VALUE_TYPE >
bsl::vectorBase< VALUE_TYPE >::vectorBase ( )
inline

Member Function Documentation

◆ adopt()

template<class VALUE_TYPE >
void bsl::vectorBase< VALUE_TYPE >::adopt ( BloombergLP::bslmf::MovableRef< vectorBase< VALUE_TYPE > >  base)
inline

Adopt all outstanding memory allocations associated with the specified base object. The behavior is undefined unless this object is in a default-constructed state.

◆ at() [1/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::reference bsl::vectorBase< VALUE_TYPE >::at ( size_type  position)

Return a reference providing modifiable access to the element at the specified position in this vector. Throw a std::out_of_range exception if position >= size().

◆ at() [2/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_reference bsl::vectorBase< VALUE_TYPE >::at ( size_type  position) const

Return a reference providing non-modifiable access to the element at the specified position in this vector. Throw a bsl::out_of_range exception if position >= size().

◆ back() [1/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::reference bsl::vectorBase< VALUE_TYPE >::back ( )
inline

Return a reference providing modifiable access to the last element in this vector. The behavior is undefined unless this vector is not empty.

◆ back() [2/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_reference bsl::vectorBase< VALUE_TYPE >::back ( ) const
inline

Return a reference providing non-modifiable access to the last element in this vector. The behavior is undefined unless this vector is not empty.

◆ begin() [1/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::iterator bsl::vectorBase< VALUE_TYPE >::begin ( )
inline

Return an iterator providing modifiable access to the first element in this vector, or the past-the-end iterator if this vector is empty.

◆ begin() [2/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_iterator bsl::vectorBase< VALUE_TYPE >::begin ( ) const
inline

◆ capacity()

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::size_type bsl::vectorBase< VALUE_TYPE >::capacity ( ) const
inline

Return the capacity of this vector, i.e., the maximum number of elements for which resizing is guaranteed not to trigger a reallocation.

◆ cbegin()

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_iterator bsl::vectorBase< VALUE_TYPE >::cbegin ( ) const
inline

Return an iterator providing non-modifiable access to the first element in this vector, and the past-the-end iterator if this vector is empty.

◆ cend()

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_iterator bsl::vectorBase< VALUE_TYPE >::cend ( ) const
inline

Return the past-the-end (forward) iterator providing non-modifiable access to this vector.

◆ crbegin()

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_reverse_iterator bsl::vectorBase< VALUE_TYPE >::crbegin ( ) const
inline

Return a reverse iterator providing non-modifiable access to the last element in this vector, and the past-the-end reverse iterator if this vector is empty.

◆ crend()

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_reverse_iterator bsl::vectorBase< VALUE_TYPE >::crend ( ) const
inline

Return the past-the-end reverse iterator providing non-modifiable access to this vector.

◆ data() [1/2]

template<class VALUE_TYPE >
VALUE_TYPE * bsl::vectorBase< VALUE_TYPE >::data ( )
inline

Return the address of the modifiable first element in this vector, or a valid, but non-dereferenceable pointer value if this vector is empty.

◆ data() [2/2]

template<class VALUE_TYPE >
const VALUE_TYPE * bsl::vectorBase< VALUE_TYPE >::data ( ) const
inline

Return the address of the non-modifiable first element in this vector, or a valid, but non-dereferenceable pointer value if this vector is empty.

◆ empty()

template<class VALUE_TYPE >
bool bsl::vectorBase< VALUE_TYPE >::empty ( ) const
inline

◆ end() [1/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::iterator bsl::vectorBase< VALUE_TYPE >::end ( )
inline

Return the past-the-end iterator providing modifiable access to this vector.

◆ end() [2/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_iterator bsl::vectorBase< VALUE_TYPE >::end ( ) const
inline

◆ front() [1/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::reference bsl::vectorBase< VALUE_TYPE >::front ( )
inline

Return a reference providing modifiable access to the first element in this vector. The behavior is undefined unless this vector is not empty.

◆ front() [2/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_reference bsl::vectorBase< VALUE_TYPE >::front ( ) const
inline

Return a reference providing non-modifiable access to the first element in this vector. The behavior is undefined unless this vector is not empty.

◆ operator[]() [1/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::reference bsl::vectorBase< VALUE_TYPE >::operator[] ( size_type  position)
inline

Return a reference providing modifiable access to the element at the specified position in this vector. The behavior is undefined unless position < size().

◆ operator[]() [2/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_reference bsl::vectorBase< VALUE_TYPE >::operator[] ( size_type  position) const
inline

Return a reference providing non-modifiable access to the element at the specified position in this vector. The behavior is undefined unless position < size().

◆ rbegin() [1/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::reverse_iterator bsl::vectorBase< VALUE_TYPE >::rbegin ( )
inline

Return a reverse iterator providing modifiable access to the last element in this vector, and the past-the-end reverse iterator if this vector is empty.

◆ rbegin() [2/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_reverse_iterator bsl::vectorBase< VALUE_TYPE >::rbegin ( ) const
inline

◆ rend() [1/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::reverse_iterator bsl::vectorBase< VALUE_TYPE >::rend ( )
inline

Return the past-the-end reverse iterator providing modifiable access to this vector.

◆ rend() [2/2]

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::const_reverse_iterator bsl::vectorBase< VALUE_TYPE >::rend ( ) const
inline

◆ size()

template<class VALUE_TYPE >
vectorBase< VALUE_TYPE >::size_type bsl::vectorBase< VALUE_TYPE >::size ( ) const
inline

Member Data Documentation

◆ d_capacity

template<class VALUE_TYPE >
std::size_t bsl::vectorBase< VALUE_TYPE >::d_capacity
protected

◆ d_dataBegin_p

template<class VALUE_TYPE >
VALUE_TYPE* bsl::vectorBase< VALUE_TYPE >::d_dataBegin_p
protected

◆ d_dataEnd_p

template<class VALUE_TYPE >
VALUE_TYPE* bsl::vectorBase< VALUE_TYPE >::d_dataEnd_p
protected

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