[#BloombergLP-bslma-TestAllocator_Proxy] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::TestAllocator_Proxy :relfileprefix: ../../ :mrdocs: This class provides a proxy to the test allocator that is supplied to the `BSLMA_TESTALLOCATOR_EXCEPTION_TEST_BEGIN` macro. This proxy may be instantiated with `TestAllocator`, or with a type that supports the same interface as `TestAllocator`. == Synopsis Declared in `<bslma_testallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class BSLMA_ALLOC_TYPE> class TestAllocator_Proxy : public xref:BloombergLP/bslma/TestAllocator_ProxyBase.adoc[TestAllocator_ProxyBase] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bslma/TestAllocator_ProxyBase.adoc[TestAllocator_ProxyBase]` | This class provides a common base class for the parameterized `TestAllocator_Proxy` class (below). Note that the `virtual` `setAllocationLimit` method, although a "setter", _must_ be declared `const`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/TestAllocator_Proxy/2constructor.adoc[`TestAllocator_Proxy`] [.small]#[constructor]# | Create a proxy for the specified `allocator` used by the exception test macros. | xref:BloombergLP/bslma/TestAllocator_Proxy/2destructor.adoc[`~TestAllocator_Proxy`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this proxy object. | xref:BloombergLP/bslma/TestAllocator_Proxy/setAllocationLimit.adoc[`setAllocationLimit`] [.small]#[virtual]# | Set the allocation limit on the proxied test allocator. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/TestAllocator_getProxy.adoc[`TestAllocator_getProxy`] | Return, by value, a test allocator proxy for the specified parameterized `allocator`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#