Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bsl::String_ClearProctor< FULL_STRING_TYPE > Class Template Reference
[Component bslstl_string]

#include <bslstl_string.h>

List of all members.

Public Member Functions

 String_ClearProctor (FULL_STRING_TYPE *stringPtr)
 ~String_ClearProctor ()
void release ()

Detailed Description

template<class FULL_STRING_TYPE>
class bsl::String_ClearProctor< FULL_STRING_TYPE >

This component private class implements a proctor that sets the length of a string to zero, and, if release is not called, will restore that string upon it's destruction. The intended usage is to implement assign methods in terms of append (by clearing the string before appending to it), while maintaining the strong exceptions guarantee. Note that after constructing this proctor for a string s, the invariant s[s.length()] == CHAR_TYPE() is violated for non-empty s. This invariant will be restored by either a successful append or by the proctor's destructor if an exception is thrown. Note that the template parameter was renamed from STRING_TYPE to FULL_STRING_TYPE due to a name clash with a define elsewhere in the code base (see DRQS 112049582).

See Component bslstl_string


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