Class: TValueAccessor

Declaration: HeteroDiskDictionary.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TKeyValueAccessorFor TMonomorphicKeyValueAccessorFor TMonomorphicValueAccessorFor TPolymorphicKeyValueAccessorFor TPolymorphicValueAccessorFor TValueAccessorFor

Purpose:

This class provides implementation for TValueAccessorFor<AValue> and brethren.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Must have intimate knowledge of MAccessorHelperFor (which supplies protocol for TValueAccessor). Clients may derive from this class if they wish to write their own ValueAccessor for values in a THeterogenousDiskDictionaryOf. Clients must understand how to use MAccessorHelperFor<AKey>::SetKey in order to derive from TValueAccessor. Clients are responsible for providing member functions that will Add a value to a THeterogenousDiskDictionaryOf. Clients are responsible for providing member functions that will Copy a value from a THeterogenousDiskDictionaryOf. Clients should not override the IsValid member function.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

Primarily for internal use.

Member Function: TValueAccessor::TValueAccessor

TValueAccessor ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TValueAccessor::~TValueAccessor

~ TValueAccessor ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called 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: TValueAccessor::IsValid

bool IsValid () const

Interface Category:

API.

Purpose:

Makes sure that a key has been set for the accessor.

Calling Context:

Called to make sure that the key has been set.

Parameters:

Return Value:

Returns a bool as to whether the TValueAccessor is valid or not.

Exceptions:

Throws TDiskDictionaryInvalidArgumentsException if SetKey has not been called.

Concurrency:

Not multithread safe.

Other Considerations:

MAccessorHelperFor<AKey>::SetKey(AKey*, TValueAccessor&) must have been called prior to making this member function call. (An MAccessorHelperFor would be a THeterogenousDiskDictionaryOf, see the description for THeterogenousDiskDictionaryOf.)

Member Function: TValueAccessor::BindKey

void BindKey (MStorageProvider * provider, void * aKey)

Interface Category:

API.

Purpose:

For MAccessorHelperFor<AKey> only.

Calling Context:

Called by MAccessorHelperFor<AKey> only.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

For internal use only.

Member Function: TValueAccessor::GetKey

void * GetKey () const

Interface Category:

API.

Purpose:

For MAccessorHelperFor<AKey> only.

Calling Context:

Called by MAccessorHelperFor<AKey> only.

Parameters:

Return Value:

Returns the key object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

For internal use only.

Member Function: TValueAccessor::ForgetKey

void * ForgetKey ()

Interface Category:

API.

Purpose:

For MAccessorHelperFor<AKey> only.

Calling Context:

Called by MAccessorHelperFor<AKey> only.

Parameters:

Return Value:

Returns the key that was associated with this accessor.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

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