SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Forwards deallocation requests to a static callback method. More...
#include <rw/tools/bustring.h>
Public Member Functions | |
StaticDeallocator (void(*deallocator)(RWUChar16 *), bool destroyAfterDeallocate=false) | |
virtual | ~StaticDeallocator () |
Protected Member Functions | |
virtual void | doDeallocate (RWUChar16 *p) const |
virtual void | doDeallocate (RWUChar16 *p) |
Private Attributes | |
void(* | deallocator_ )(RWUChar16 *) |
bool | destroyAfterDeallocate_ |
StaticDeallocator forwards deallocation requests to a simple, client-defined, static callback method of the form:
void (*deallocator)(RWUChar16*)
RWBasicUString::StaticDeallocator::StaticDeallocator | ( | void(*)(RWUChar16 *) | deallocator, | |
bool | destroyAfterDeallocate = false | |||
) |
Constructs and initializes an instance with a pointer to a client-supplied deallocation function. The destroyAfterDeallocate is used to control the life-span of a StaticDeallocator instance. A value of true
causes the StaticDeallocator to delete itself immediately after calling the deallocator function.
virtual RWBasicUString::StaticDeallocator::~StaticDeallocator | ( | ) | [virtual] |
Required for virtual destruction.
virtual void RWBasicUString::StaticDeallocator::doDeallocate | ( | RWUChar16 * | p | ) | [inline, protected, virtual] |
Forwards deallocation requests to the client-supplied deallocator method.
Reimplemented from RWBasicUString::Deallocator.
virtual void RWBasicUString::StaticDeallocator::doDeallocate | ( | RWUChar16 * | p | ) | const [protected, virtual] |
Forwards deallocation requests to the client-supplied deallocator method.
Implements RWBasicUString::Deallocator.
void(* RWBasicUString::StaticDeallocator::deallocator_)(RWUChar16 *) [private] |
The client-supplied deallocator callback function.
bool RWBasicUString::StaticDeallocator::destroyAfterDeallocate_ [private] |
Controls destruction of self.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.