Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bsltf::ArgumentType< N > Class Template Reference

#include <bsltf_argumenttype.h>

List of all members.

Public Member Functions

 ArgumentType ()
 ArgumentType (int value)
 ArgumentType (const ArgumentType &original)
 ArgumentType (BloombergLP::bslmf::MovableRef< ArgumentType > original)
 ~ArgumentType ()
ArgumentTypeoperator= (const ArgumentType &rhs)
ArgumentTypeoperator= (BloombergLP::bslmf::MovableRef< ArgumentType > rhs)
 operator int () const
MoveState::Enum movedFrom () const
MoveState::Enum movedInto () const

Detailed Description

template<int N>
class bsltf::ArgumentType< N >

This class template declares a separate type for each template parameter value N, bsltf::ArgumentType<N>, that wraps an integer value and provides implicit conversion to and from int. Its main purpose is that having separate types for testing enables distinguishing them when calling through a function template interface, thereby avoiding ambiguities or accidental switching of arguments in the implementation of in-place constructors.

See Component bsltf_argumenttype


Constructor & Destructor Documentation

template<int N>
bsltf::ArgumentType< N >::ArgumentType (  ) 

Create an ArgumentType object having the default attribute value -1.

template<int N>
bsltf::ArgumentType< N >::ArgumentType ( int  value  )  [explicit]

Create an ArgumentType object having the specified value. The behavior is undefined unless value >= 0.

template<int N>
bsltf::ArgumentType< N >::ArgumentType ( const ArgumentType< N > &  original  ) 

Create an ArgumentType object having the same value as the specified original.

template<int N>
bsltf::ArgumentType< N >::ArgumentType ( BloombergLP::bslmf::MovableRef< ArgumentType< N > >  original  ) 

Create an ArgumentType object having the same value as the specified original. Note that original is left in a valid but unspecified state.

template<int N>
bsltf::ArgumentType< N >::~ArgumentType (  ) 

Destroy this object.


Member Function Documentation

template<int N>
ArgumentType& bsltf::ArgumentType< N >::operator= ( const ArgumentType< N > &  rhs  ) 

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.

template<int N>
ArgumentType& bsltf::ArgumentType< N >::operator= ( BloombergLP::bslmf::MovableRef< ArgumentType< N > >  rhs  ) 

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object. Note that rhs is left in a valid but unspecified state.

template<int N>
bsltf::ArgumentType< N >::operator int (  )  const

Return the value of this object.

template<int N>
MoveState::Enum bsltf::ArgumentType< N >::movedFrom (  )  const

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

template<int N>
MoveState::Enum bsltf::ArgumentType< N >::movedInto (  )  const

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


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