SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWBasicUString::StaticDeallocator Class Reference

Forwards deallocation requests to a static callback method. More...

#include <rw/tools/bustring.h>

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

Public Member Functions

 StaticDeallocator (void(*deallocator)(RWUChar16 *), bool destroyAfterDeallocate=false)
 
virtual ~StaticDeallocator ()
 
- Public Member Functions inherited from RWBasicUString::Deallocator
virtual ~Deallocator ()
 
void deallocate (RWUChar16 *p)
 
void deallocate (RWUChar16 *p) const
 

Protected Member Functions

virtual void doDeallocate (RWUChar16 *p)
 
virtual void doDeallocate (RWUChar16 *p) const
 
- Protected Member Functions inherited from RWBasicUString::Deallocator
 Deallocator ()
 

Private Attributes

void(* deallocator_ )(RWUChar16 *)
 
bool destroyAfterDeallocate_
 

Detailed Description

StaticDeallocator forwards deallocation requests to a simple, client-defined, static callback method of the form:

void (*deallocator)(RWUChar16*)
unspecified_16bit_type RWUChar16
Definition uchar.h:66

Constructor & Destructor Documentation

◆ StaticDeallocator()

RWBasicUString::StaticDeallocator::StaticDeallocator ( void(* deallocator )(RWUChar16 *),
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.

◆ ~StaticDeallocator()

virtual RWBasicUString::StaticDeallocator::~StaticDeallocator ( )
virtual

Required for virtual destruction.

Member Function Documentation

◆ doDeallocate() [1/2]

virtual void RWBasicUString::StaticDeallocator::doDeallocate ( RWUChar16 * p)
inlineprotectedvirtual

Forwards deallocation requests to the client-supplied deallocator method.

Reimplemented from RWBasicUString::Deallocator.

◆ doDeallocate() [2/2]

virtual void RWBasicUString::StaticDeallocator::doDeallocate ( RWUChar16 * p) const
protectedvirtual

Forwards deallocation requests to the client-supplied deallocator method.

Implements RWBasicUString::Deallocator.

Member Data Documentation

◆ deallocator_

void(* RWBasicUString::StaticDeallocator::deallocator_) (RWUChar16 *)
private

The client-supplied deallocator callback function.

◆ destroyAfterDeallocate_

bool RWBasicUString::StaticDeallocator::destroyAfterDeallocate_
private

Controls destruction of self.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.