Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions

bsltf::StdAllocTestType< ALLOC > Class Template Reference

#include <bsltf_stdalloctesttype.h>

List of all members.

Public Types

typedef ALLOC allocator_type

Public Member Functions

 StdAllocTestType (const ALLOC &stdAllocator=ALLOC())
 StdAllocTestType (int value, const ALLOC &stdAllocator=ALLOC())
 StdAllocTestType (const StdAllocTestType &original)
 StdAllocTestType (const StdAllocTestType &original, const ALLOC &stdAllocator)
 ~StdAllocTestType ()
StdAllocTestTypeoperator= (const StdAllocTestType &rhs)
void setData (int value)
int data () const
const ALLOC & allocator () const

Detailed Description

template<class ALLOC>
class bsltf::StdAllocTestType< ALLOC >

This unconstrained (value-semantic) attribute class uses a standard allocator of (template parameter) type ALLOC to allocate memory. This class does NOT define the type trait bslma::UsesBslmaAllocator. This class is primarily provided to facilitate testing of templates by defining a simple type representative of user-defined types using a standard allocator. See the Attributes section under @DESCRIPTION in the component-level documentation for information on the class attributes.

See Component bsltf_stdalloctesttype


Member Typedef Documentation

template<class ALLOC>
typedef ALLOC bsltf::StdAllocTestType< ALLOC >::allocator_type

needed by uses_allocator trait


Constructor & Destructor Documentation

template<class ALLOC>
bsltf::StdAllocTestType< ALLOC >::StdAllocTestType ( const ALLOC &  stdAllocator = ALLOC()  )  [explicit]

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

          data() == 0

Optionally specify a stdAllocator used to supply memory. If an allocator is not supplied, a default-constructed object of the template parameter type ALLOC is used.

template<class ALLOC>
bsltf::StdAllocTestType< ALLOC >::StdAllocTestType ( int  value,
const ALLOC &  stdAllocator = ALLOC() 
) [explicit]

Create a StdAllocTestType object having the specified data attribute value. Optionally specify a stdAllocator used to supply memory. If basicAllocator is not supplied, a default constructed object of (template parameter) type ALLOC is used.

template<class ALLOC>
bsltf::StdAllocTestType< ALLOC >::StdAllocTestType ( const StdAllocTestType< ALLOC > &  original  ) 
template<class ALLOC>
bsltf::StdAllocTestType< ALLOC >::StdAllocTestType ( const StdAllocTestType< ALLOC > &  original,
const ALLOC &  stdAllocator 
)

Create a StdAllocTestType object having the same value as the specified original object. Optionally specify a stdAllocator used to supply memory. If basicAllocator is not supplied, a default constructed object of (template parameter) type ALLOC is used.

template<class ALLOC>
bsltf::StdAllocTestType< ALLOC >::~StdAllocTestType (  ) 

Destroy this object.


Member Function Documentation

template<class ALLOC>
StdAllocTestType& bsltf::StdAllocTestType< ALLOC >::operator= ( const StdAllocTestType< ALLOC > &  rhs  ) 

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

template<class ALLOC>
void bsltf::StdAllocTestType< ALLOC >::setData ( int  value  ) 

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

template<class ALLOC>
int bsltf::StdAllocTestType< ALLOC >::data (  )  const

Return the value of the data attribute of this object.

template<class ALLOC>
const ALLOC& bsltf::StdAllocTestType< ALLOC >::allocator (  )  const

Return the allocator used by this object to supply memory.


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