Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bsltf::MovableTestType Class Reference

#include <bsltf_movabletesttype.h>

List of all members.

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 ()
MovableTestTypeoperator= (const MovableTestType &rhs)
MovableTestTypeoperator= (bslmf::MovableRef< MovableTestType > rhs)
void setData (int value)
void setMovedInto (MoveState::Enum value)
int data () const
MoveState::Enum movedInto () const
MoveState::Enum movedFrom () const

Detailed Description

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.

See Component bsltf_movabletesttype


Constructor & Destructor Documentation

bsltf::MovableTestType::MovableTestType (  ) 

Create a MovableTestType object having the (default) attribute values:

          data()      == -1
          movedInto() == e_NOT_MOVED
          movedFrom() == e_NOT_MOVED
bsltf::MovableTestType::MovableTestType ( int  data  )  [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 (  ) 

Destroy this object.


Member Function Documentation

bsltf::MovableTestType::BSLMF_NESTED_TRAIT_DECLARATION ( MovableTestType  ,
bsl::is_nothrow_move_constructible   
)
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.

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.

void bsltf::MovableTestType::setData ( int  value  ) 

Set the data attribute of this object to the specified value.

void bsltf::MovableTestType::setMovedInto ( MoveState::Enum  value  ) 

Set the moved-into state of this object to the specified value.

int bsltf::MovableTestType::data (  )  const

Return the value of the data attribute of this object.

MoveState::Enum bsltf::MovableTestType::movedInto (  )  const

Return the move state of this object as target of a move operation.

MoveState::Enum bsltf::MovableTestType::movedFrom (  )  const

Return the move state of this object as source of a move operation.


The documentation for this class was generated from the following file: