|
BDE 4.39.x Production Release
|
#include <bsltf_movabletesttype.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. 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.
Public Member Functions | |
| BSLMF_NESTED_TRAIT_DECLARATION (MovableTestType, bsl::is_nothrow_move_constructible) | |
| MovableTestType () | |
| MovableTestType (int data) | |
| MovableTestType (const MovableTestType &original) | |
| MovableTestType (bslmf::MovableRef< MovableTestType > original) BSLS_KEYWORD_NOEXCEPT | |
| ~MovableTestType () | |
| MovableTestType & | operator= (const MovableTestType &rhs) |
| MovableTestType & | operator= (bslmf::MovableRef< MovableTestType > rhs) |
| void | setData (int value) |
| void | setMovedInto (MoveState::Enum value) |
| int | data () const |
| MoveState::Enum | movedInto () const |
| MoveState::Enum | movedFrom () const |
| bsltf::MovableTestType::MovableTestType | ( | ) |
Create a MovableTestType object having the (default) attribute values:
|
explicit |
Create a MovableTestType object having the specified data attribute value.
| bsltf::MovableTestType::MovableTestType | ( | const MovableTestType & | original | ) |
Create a MovableTestType object having the same value as the specified original object.
movedInto() for this object will be e_NOT_MOVED, and original.movedFrom() will also be e_NOT_MOVED. | bsltf::MovableTestType::MovableTestType | ( | bslmf::MovableRef< MovableTestType > | original | ) |
Create a MovableTestType object having the same value as the specified original object.
movedInto() for this object will be e_MOVED, and original.movedFrom() will also be e_MOVED. | bsltf::MovableTestType::~MovableTestType | ( | ) |
Destroy this object.
| bsltf::MovableTestType::BSLMF_NESTED_TRAIT_DECLARATION | ( | MovableTestType | , |
| bsl::is_nothrow_move_constructible | |||
| ) |
|
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.
| MovableTestType & bsltf::MovableTestType::operator= | ( | bslmf::MovableRef< MovableTestType > | rhs | ) |
Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.
movedInto() for this object will be e_MOVED, and rhs.movedFrom() will also be e_MOVED. | MovableTestType & bsltf::MovableTestType::operator= | ( | const MovableTestType & | rhs | ) |
Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.
movedInto() for this object will be e_NOT_MOVED, and rhs.movedFrom() will also be e_NOT_MOVED. | void bsltf::MovableTestType::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.