Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bsltf::AllocTestType Class Reference

#include <bsltf_alloctesttype.h>

List of all members.

Public Member Functions

 AllocTestType ()
 AllocTestType (bslma::Allocator *basicAllocator)
 AllocTestType (int data, bslma::Allocator *basicAllocator=0)
 AllocTestType (const AllocTestType &original, bslma::Allocator *basicAllocator=0)
 ~AllocTestType ()
AllocTestTypeoperator= (const AllocTestType &rhs)
void setData (int value)
int data () const
bslma::Allocatorallocator () const

Detailed Description

This unconstrained (value-semantic) attribute class that uses a bslma::Allocator to supply memory and defines 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 having an allocator. See the Attributes section under @DESCRIPTION in the component-level documentation for information on the class attributes.

See Component bsltf_alloctesttype


Constructor & Destructor Documentation

bsltf::AllocTestType::AllocTestType (  ) 
bsltf::AllocTestType::AllocTestType ( bslma::Allocator basicAllocator  )  [explicit]

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

          data() == 0

Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

bsltf::AllocTestType::AllocTestType ( int  data,
bslma::Allocator basicAllocator = 0 
) [explicit]

Create a AllocTestType object having the specified data attribute value. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

bsltf::AllocTestType::AllocTestType ( const AllocTestType original,
bslma::Allocator basicAllocator = 0 
)

Create a AllocTestType object having the same value as the specified original object. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

bsltf::AllocTestType::~AllocTestType (  ) 

Destroy this object.


Member Function Documentation

AllocTestType& bsltf::AllocTestType::operator= ( const AllocTestType rhs  ) 

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

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

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

int bsltf::AllocTestType::data (  )  const

Return the value of the data attribute of this object.

bslma::Allocator* bsltf::AllocTestType::allocator (  )  const

Return the allocator used by this object to supply memory.


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