SourcePro® C++ API Reference Guide

Product Documentation:
   SourcePro C++
Documentation Home
List of all members | Public Member Functions | Protected Member Functions
RWBasicUString::Deallocator Class Referenceabstract

Base class for subclasses that release client-allocated storage. More...

#include <rw/tools/bustring.h>

Inheritance diagram for RWBasicUString::Deallocator:
RWBasicUString::StaticDeallocator

Public Member Functions

virtual ~Deallocator ()
 
void deallocate (RWUChar16 *p)
 
void deallocate (RWUChar16 *p) const
 

Protected Member Functions

 Deallocator ()
 
virtual void doDeallocate (RWUChar16 *p)
 
virtual void doDeallocate (RWUChar16 *p) const =0
 

Detailed Description

Deallocator acts as an abstract base class for subclasses that release client-allocated storage.

Deallocator objects are required because RWBasicUString cannot assume that local invocation of methods such as operator delete[] or std::free() manipulate the same heap as that of the client. Such a case might arise if, for instance, an application contains some libraries that use debug versions of heap management routines while others do not.

A Deallocator subclass must override both doDeallocate() methods to avoid the ambiguities produced should the subclass declaration "hide" one of the superclass declarations of these functions.

Constructor & Destructor Documentation

virtual RWBasicUString::Deallocator::~Deallocator ( )
virtual

Required for virtual destruction.

RWBasicUString::Deallocator::Deallocator ( )
inlineprotected

Defined only to prevent direct instantiation of this class.

Member Function Documentation

void RWBasicUString::Deallocator::deallocate ( RWUChar16 p)
inline

Forwards a deallocation request to a subclass-defined non-const deallocation method.

void RWBasicUString::Deallocator::deallocate ( RWUChar16 p) const
inline

Forwards a deallocation request to a subclass-defined const deallocation method.

virtual void RWBasicUString::Deallocator::doDeallocate ( RWUChar16 p)
protectedvirtual

A virtual function that must be implemented in each subclass. A subclass implementation should take whatever actions are required to deallocate the storage identified by p. The default implementation of this function simply forwards to the const version.

Reimplemented in RWBasicUString::StaticDeallocator.

virtual void RWBasicUString::Deallocator::doDeallocate ( RWUChar16 p) const
protectedpure virtual

A pure virtual function that must be implemented in each subclass. A subclass implementation should take whatever actions are required to deallocate the storage identified by p.

Implemented in RWBasicUString::StaticDeallocator.

Copyright © 2016 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.
Provide feedback to Rogue Wave about its documentation.