[#BloombergLP-balb-ReservationGuard]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::ReservationGuard
:relfileprefix: ../../
:mrdocs:

This class template implements a proctor for reserving and cancelling units in a rate controlling object&period;

== Synopsis

Declared in `&lt;balb&lowbar;reservationguard&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
class ReservationGuard;
----

== Description

This class&colon; &ast; is _exception_ _neutral_ (agnostic) &ast; is _const_ _thread&hyphen;safe_ For terminology see `bsldoc&lowbar;glossary`&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balb/ReservationGuard/2constructor.adoc[`ReservationGuard`]         [.small]#[constructor]#
| Create a `ReservationGuard` object guarding the specified `rateController` and reserving the specified `numUnits`&period;
| xref:BloombergLP/balb/ReservationGuard/2destructor.adoc[`&#126;ReservationGuard`] [.small]#[destructor]#
| Destroy this object&period; Invoke the `cancelReserved` method for the remaining remaining units reserved by this proctor&period;
| xref:BloombergLP/balb/ReservationGuard/cancelReserved.adoc[`cancelReserved`] 
| Cancel the specified `numUnits` from the reserve units guarded by this object&period;
| xref:BloombergLP/balb/ReservationGuard/ptr.adoc[`ptr`] 
| Return a pointer to the rate controlling object used by this object&period;
| xref:BloombergLP/balb/ReservationGuard/submitReserved.adoc[`submitReserved`] 
| Submit the specified `numUnits` from the reserve units guarded by this object&period;
| xref:BloombergLP/balb/ReservationGuard/unitsReserved.adoc[`unitsReserved`] 
| Return the number of units reserved by this object&period;
|===



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