[#BloombergLP-bslma-TestAllocator_Proxy]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::TestAllocator&lowbar;Proxy
:relfileprefix: ../../
:mrdocs:

This class provides a proxy to the test allocator that is supplied to the `BSLMA&lowbar;TESTALLOCATOR&lowbar;EXCEPTION&lowbar;TEST&lowbar;BEGIN` macro&period; This proxy may be instantiated with `TestAllocator`, or with a type that supports the same interface as `TestAllocator`&period;

== Synopsis

Declared in `&lt;bslma&lowbar;testallocator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class BSLMA&lowbar;ALLOC&lowbar;TYPE&gt;
class TestAllocator&lowbar;Proxy
    : public xref:BloombergLP/bslma/TestAllocator_ProxyBase.adoc[TestAllocator&lowbar;ProxyBase]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslma/TestAllocator_ProxyBase.adoc[TestAllocator&lowbar;ProxyBase]`
| This class provides a common base class for the parameterized `TestAllocator&lowbar;Proxy` class (below)&period; Note that the `virtual` `setAllocationLimit` method, although a &quot;setter&quot;, _must_ be declared `const`&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/TestAllocator_Proxy/2constructor.adoc[`TestAllocator&lowbar;Proxy`]         [.small]#[constructor]#
| Create a proxy for the specified `allocator` used by the exception test macros&period;
| xref:BloombergLP/bslma/TestAllocator_Proxy/2destructor.adoc[`&#126;TestAllocator&lowbar;Proxy`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy this proxy object&period;
| xref:BloombergLP/bslma/TestAllocator_Proxy/setAllocationLimit.adoc[`setAllocationLimit`]  [.small]#[virtual]#
| Set the allocation limit on the proxied test allocator&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/TestAllocator_getProxy.adoc[`TestAllocator&lowbar;getProxy`]
| Return, by value, a test allocator proxy for the specified parameterized `allocator`&period;
|===


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