BDE 4.14.0 Production release
|
#include <bsltf_movabletesttype.h>
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 () | |
Destroy this object. | |
MovableTestType & | operator= (const MovableTestType &rhs) |
MovableTestType & | operator= (bslmf::MovableRef< MovableTestType > rhs) |
void | setData (int value) |
Set the data attribute of this object to the specified value . | |
void | setMovedInto (MoveState::Enum value) |
Set the moved-into state of this object to the specified value . | |
int | data () const |
Return the value of the data attribute of this object. | |
MoveState::Enum | movedInto () const |
Return the move state of this object as target of a move operation. | |
MoveState::Enum | movedFrom () const |
Return the move state of this object as source of a move operation. | |
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.
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. Note that 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. Note that movedInto()
for this object will be e_MOVED
, and original.movedFrom()
will also be e_MOVED
.
bsltf::MovableTestType::~MovableTestType | ( | ) |
bsltf::MovableTestType::BSLMF_NESTED_TRAIT_DECLARATION | ( | MovableTestType | , |
bsl::is_nothrow_move_constructible | |||
) |
|
inline |
|
inline |
|
inline |
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. Note that 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. Note that movedInto()
for this object will be e_NOT_MOVED
, and rhs.movedFrom()
will also be e_NOT_MOVED
.
void bsltf::MovableTestType::setData | ( | int | value | ) |
|
inline |