|
BDE 4.39.x Production Release
|
#include <bsltf_movablealloctesttype.h>
This class provides an unconstrained (value-semantic) attribute type that records when move semantics have been invoked with the object instance as the source parameter. The class uses a bslma::Allocator to allocate memory and defines the type trait bslma::UsesBslmaAllocator. This class is primarily provided to facilitate testing of templates where move semantics need to be differentiated versus copy semantics. See the Attributes section under @DESCRIPTION in the component-level documentation for information on the class attributes.
Friends | |
| CopyMoveState::Enum | copyMoveState (const MovableAllocTestType &obj) |
| void | setCopyMoveState (MovableAllocTestType *obj, CopyMoveState::Enum state) |
| bsltf::MovableAllocTestType::MovableAllocTestType | ( | ) |
Create a MovableAllocTestType object having the (default) attribute values:
Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.
|
explicit |
|
explicit |
Create a MovableAllocTestType object having the specified data attribute value. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.
| bsltf::MovableAllocTestType::MovableAllocTestType | ( | bslmf::MovableRef< MovableAllocTestType > | original | ) |
| bsltf::MovableAllocTestType::MovableAllocTestType | ( | bslmf::MovableRef< MovableAllocTestType > | original, |
| bslma::Allocator * | basicAllocator | ||
| ) |
TBD: comment this.
| bsltf::MovableAllocTestType::MovableAllocTestType | ( | const MovableAllocTestType & | original, |
| bslma::Allocator * | basicAllocator = 0 |
||
| ) |
Create a MovableAllocTestType object having the same value as the specified original object. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.
| bsltf::MovableAllocTestType::~MovableAllocTestType | ( | ) |
Destroy this object.
|
inline |
Return the allocator used by this object to supply memory.
| bsltf::MovableAllocTestType::BSLMF_NESTED_TRAIT_DECLARATION | ( | MovableAllocTestType | , |
| bsl::is_nothrow_move_constructible | |||
| ) |
|
inline |
Return the copy/move state of this object.
|
inline |
Return the value of the data attribute of this object.
|
inline |
Return the move state of this object as source of a move operation.
|
inline |
Return the move state of this object as target of a move operation.
| MovableAllocTestType & bsltf::MovableAllocTestType::operator= | ( | bslmf::MovableRef< MovableAllocTestType > | rhs | ) |
TBD: comment this.
| MovableAllocTestType & bsltf::MovableAllocTestType::operator= | ( | const MovableAllocTestType & | rhs | ) |
Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.
|
inline |
Set the copy/move state of this object to the specified state.
| void bsltf::MovableAllocTestType::setData | ( | int | value | ) |
Set the data attribute of this object to the specified value.
|
inline |
Set the moved-into state of this object to the specified value.
|
friend |
Return the copy/move state of the specified obj. This function is an ADL customization point used by CopyMoveState::get(obj).
|
friend |
Set the copy/move state of object at the specified obj address to the specified state. This function is an ADL customization point used by CopyMoveState::set(obj, state).