|
BDE 4.14.0 Production release
|
#include <bsltf_alloctesttype.h>
Public Types | |
| typedef bsl::allocator< int > | allocator_type |
Public Member Functions | |
| AllocTestType () | |
| AllocTestType (const allocator_type &allocator) | |
| AllocTestType (int data, const allocator_type &allocator=allocator_type()) | |
| AllocTestType (const AllocTestType &original, const allocator_type &allocator=allocator_type()) | |
| ~AllocTestType () | |
| Destroy this object. | |
| AllocTestType & | operator= (const AllocTestType &rhs) |
| void | setData (int value) |
Set the data attribute of this object to the specified value. | |
| int | data () const |
Return the value of the data attribute of this object. | |
| bslma::Allocator * | allocator () const |
Return get_allocator().mechanism(). | |
| allocator_type | get_allocator () const |
| Return the allocator used by this object to supply memory. | |
This unconstrained (value-semantic) attribute class that uses a bsl::allocator<> to supply memory and defines the type trait bslma::UsesBslmaAllocator. This class is primarily provided to facilitate testing of templates by defining a simple type representative of user-defined types having an allocator. See the Attributes section under @DESCRIPTION in the component-level documentation for information on the class attributes.
| typedef bsl::allocator<int> bsltf::AllocTestType::allocator_type |
| bsltf::AllocTestType::AllocTestType | ( | ) |
|
explicit |
Create a AllocTestType object having the (default) attribute values:
Optionally specify a allocator used to supply memory. If allocator is 0, the currently installed default allocator is used.
|
explicit |
Create a AllocTestType object having the specified data attribute value. Optionally specify a allocator used to supply memory (e.g., the address of a bslma::Allocator object). If allocator is not specified, the currently installed default allocator is used.
| bsltf::AllocTestType::AllocTestType | ( | const AllocTestType & | original, |
| const allocator_type & | allocator = allocator_type() |
||
| ) |
Create a AllocTestType object having the same value as the specified original object. Optionally specify a allocator used to supply memory (e.g., the address of a bslma::Allocator object). If allocator is not specified, the currently installed default allocator is used.
| bsltf::AllocTestType::~AllocTestType | ( | ) |
|
inline |
|
inline |
|
inline |
| AllocTestType & bsltf::AllocTestType::operator= | ( | const AllocTestType & | rhs | ) |
Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.
|
inline |