Class: TDeleterForArrayOf

Declaration: DeleterFor.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TDeleterForArrayOf is a class you can use to ensure that a TArrayOf object allocated on the heap gets deleted as soon as it goes out of scope.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive any classes from TDeleterForArrayOf.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TDeleterForArrayOf::~TDeleterForArrayOf

~ TDeleterForArrayOf ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Call this function directly to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDeleterForArrayOf::AdoptObject

void AdoptObject (AType *)

Interface Category:

API.

Purpose:

Adopts a new TArrayOf object.

Calling Context:

Call this function directly to delete the currently associated object and adopt the new object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDeleterForArrayOf::OrphanObject

AType * OrphanObject ()

Interface Category:

API.

Purpose:

Orphans a TArrayOf object.

Calling Context:

Call this function directly to remove the association to the current object without destroying the object.

Parameters:

Return Value:

A reference to the TArrayOf object no longer associated with this object. A NIL reference is returned if there was no associated object when this operation was called.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDeleterForArrayOf::GetObject

AType * GetObject ()

Interface Category:

API.

Purpose:

Returns the TArrayOf object associated with this object.

Calling Context:

Call this function directly to obtain a reference to the object associated with this object.

Parameters:

Return Value:

A reference to the object associated with this object. A NIL reference is returned if there is currently no object associated with this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDeleterForArrayOf::operator=

void operator =(AType *)

Interface Category:

API.

Purpose:

Adopts a new TArrayOf object.

Calling Context:

Call this function directly to delete the currently associated TArrayOf object and adopt the new object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDeleterForArrayOf::operator[]

AType & operator [] (int)

Interface Category:

API.

Purpose:

Returns the specified object contained within the associated TArrayOf.

Calling Context:

Call this function directly to retrieve an object contained within the TArrayOf associated with this object.

Parameters:

Return Value:

A reference to the object within the TArrayOf.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDeleterForArrayOf::TDeleterForArrayOf

  1. TDeleterForArrayOf ()
  2. TDeleterForArrayOf (AType *)

Interface Category:

API.

Purpose:

  1. Default constructor. Creates a TDeleterForArrayOf with no associated TArrayOf object.
  2. Creates a TDeleterForArrayOf for the specified TArrayOf object.

Calling Context:

  1. Call this function directly.
  2. Call this function directly to create a TDeleterForArrayOf for the specified object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDeleterForArrayOf::operatorAType*

operator AType * ()

Interface Category:

API.

Purpose:

Allows you to use this object like the object it is templatized over.

Calling Context:

Call this function directly when you want to use the object that this is templatized over.

Parameters:

Return Value:

Returns AType*.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.