This class provides methods for creating and deleting nodes using the appropriate allocator traits of the (template parameter) type ALLOCATOR. This type is intended to be used as a private base‐class for a node‐based container, in order to take advantage of the empty‐base‐class optimization in the case where the base class has 0 size (as may be the case if the (template parameter) type ALLOCATOR is not a bslma::Allocator).
Synopsis
Declared in <bslstl_treenodepool.h>
template<
class VALUE,
class ALLOCATOR>
class TreeNodePool;
Type Aliases
Name |
Description |
Alias for the allocator type defined by |
|
Alias for the |
Member Functions
Name |
Description |
|
Constructors |
Adopt all outstanding memory allocations associated with the specified node |
|
|
|
Allocate a node object and copy‐construct an object of the (template parameter) type |
|
Destroy the |
|
Allocate a node with a newly created value object of the (template parameter) type |
|
Return |
|
Allocate a node of the type |
|
Add to this pool sufficient memory to satisfy memory requests for at least the specified |
|
Efficiently exchange the nodes of this object with those of the specified |
|
Efficiently exchange the nodes and allocator of this object with those of the specified |
|
Efficiently exchange the nodes of this object with those of the specified |
Created with MrDocs