[#BloombergLP-bsltf-AllocTestType]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::AllocTestType
:relfileprefix: ../../
:mrdocs:

This unconstrained (value&hyphen;semantic) attribute class that uses a `bsl&colon;&colon;allocator&lt;&gt;` to supply memory and defines the type trait `bslma&colon;&colon;UsesBslmaAllocator`&period; This class is primarily provided to facilitate testing of templates by defining a simple type representative of user&hyphen;defined types having an allocator&period; See the Attributes section under DESCRIPTION in the component&hyphen;level documentation for information on the class attributes&period;

== Synopsis

Declared in `&lt;bsltf&lowbar;alloctesttype&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class AllocTestType;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsltf/AllocTestType/allocator_type.adoc[`allocator&lowbar;type`] 
| Allocator type used by this test type&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsltf/AllocTestType/2constructor-0f.adoc[`AllocTestType`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bsltf/AllocTestType/2destructor.adoc[`&#126;AllocTestType`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bsltf/AllocTestType/operator_assign.adoc[`operator&equals;`] 
| Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object&period;
| xref:BloombergLP/bsltf/AllocTestType/allocator.adoc[`allocator`] 
| Return `get&lowbar;allocator()&period;mechanism()`&period;
| xref:BloombergLP/bsltf/AllocTestType/data.adoc[`data`] 
| Return the value of the `data` attribute of this object&period;
| xref:BloombergLP/bsltf/AllocTestType/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used by this object to supply memory&period;
| xref:BloombergLP/bsltf/AllocTestType/setData.adoc[`setData`] 
| Set the `data` attribute of this object to the specified `value`&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsltf/debugprint-0b9.adoc[`debugprint`]
| Print the value of the specified `obj` to the console&period; Note that this free function is provided to allow `bsls&lowbar;bsltestutil` to support these types intended for testing&period; See the component&hyphen;level documentation for `bsls&lowbar;bsltestutil` for more details&period;
| xref:BloombergLP/bsltf/operator_not_eq-05bf.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; Two `AllocTestType` objects do not have the same value if their `data` attributes are not the same&period;
| xref:BloombergLP/bsltf/operator_eq-0b9e.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; Two `AllocTestType` objects have the same if their `data` attributes are the same&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
