#include <bslalg_containerbase.h>
List of all members.
Detailed Description
template<class ALLOCATOR>
class bslalg::ContainerBase< ALLOCATOR >
Allocator proxy class for STL-style containers. Provides access to the allocator. Implements the entire STL allocator interface, redirecting allocation and deallocation calls to the proxied allocator. One of two possible base classes is chosen depending on whether ALLOCATOR
is constructed from bslma::Allocator*
.
See Component bslalg_containerbase
Member Typedef Documentation
template<class ALLOCATOR >
template<class ALLOCATOR >
template<class ALLOCATOR >
template<class ALLOCATOR >
template<class ALLOCATOR >
template<class ALLOCATOR >
template<class ALLOCATOR >
Constructor & Destructor Documentation
template<class ALLOCATOR >
Construct this object using the specified basicAllocator
of the parameterized ALLOCATOR
type.
template<class ALLOCATOR >
Initialize this container base with rhs. NOTE: This is not a true copy constructor. The allocator does not get copied if the allocator is bslma
-based. Using BSL allocator semantics, the bslma
-style allocator must be supplied explicitly (i.e., not copied from rhs) or else it is given a default value. Non-'bslma' allocators ARE copied because that is the way the ISO standard is currently written.
template<class ALLOCATOR >
Member Function Documentation
template<class ALLOCATOR >
Allocate enough (properly aligned) space for n
objects of type T
by calling allocate
on the mechanism object. The hint
argument is ignored by this allocator type.
template<class ALLOCATOR >
template<class T >
- Parameters:
-
| n | Allocate (but do not initialize) n objects of type T using the allocator returned by allocator . Return a pointer to the raw memory that was allocated. The p argument is used only to determine the type of object being allocated; its value (usually null) is not used. |
template<class ALLOCATOR >
Copy-construct a T
object at the memory address specified by p
. Do not directly allocate memory. The behavior is undefined if p
is not properly aligned for T
.
template<class ALLOCATOR >
Return memory previously allocated with allocate
to the underlying mechanism object by calling deallocate
on the mechanism object. The n
argument is ignored by this allocator type.
template<class ALLOCATOR >
template<class T >
- Parameters:
-
| n | Return n objects of type T , starting at p to the allocator returned by allocator . Does not call destructors on the deallocated objects. |
template<class ALLOCATOR >
Call the T
destructor for the object pointed to by p
. Do not directly deallocate any memory.
template<class ALLOCATOR >
Returns this->allocator() == rhs.allocator()
.
The documentation for this class was generated from the following file: