Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TValueAccessor
Inherited By:
None.
Purpose:
A value accessor that is aware of the key type.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TPolymorphicKeyValueAccessorFor (const MAccessorHelperFor < AKey > & helper)
- TPolymorphicKeyValueAccessorFor (const TPolymorphicKeyValueAccessorFor < AKey, AValue >& copy)
Interface Category:
API.
Purpose:
- Constructor. Creates a TPolymorphicKeyValueAccessorFor given a MAccessorHelperFor<AKey > (for example, THeterogenousDiskDictionaryOf<AKey>).
- Copy constructor. Creates a TPolymorphicKeyValueAccessorFor given a TPolymorphicKeyValueAccessorFor.
Calling Context:
- Called at construction to create an accessor for adding and retrieving values from a THeterogenousDiskDictionaryOf.
- Called to copy a TPolymorphicKeyValueAccessorFor.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TPolymorphicKeyValueAccessorFor < AKey , AValue >& operator =(const TPolymorphicKeyValueAccessorFor < AKey, AValue >& right)
Interface Category:
API.
Purpose:
Returns a dereferenced copy of the TPolymorphicKeyValueAccessorFor.
Calling Context:
Called to return a dereferenced copy of the TPolymorphicKeyValueAccessorFor.
Parameters:
- const TPolymorphicKeyValueAccessorFor < AKey -Specifies the class of the key object that the accessor will use.
- AValue >& right -Specifies the class of the value object that the accessor will use.
Return Value:
Returns a dereferenced copy of the TMonomorphicKeyValueAccessorFor.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
~ TPolymorphicKeyValueAccessorFor ()
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.
bool Add (const AKey & theKey, const AValue & theValue, bool replaceExistingValue =false) const
Interface Category:
API.
Purpose:
Adds objects by calling Flatten(AValue,...).
Calling Context:
Called to add a key-value pair to the disk dictionary.
Parameters:
- const AKey & theKey -Specifies the key object to be added.
- const AValue & theValue -Specifies the value object to be added.
- bool replaceExistingValue =false -If the replace flag is false and there is a key that is equal to the passed-in key, then returns false. If the replace flag is true and there is a key that is equal to the passed-in key, then replaces the value with the passed-in value. If there is no existing record, then adds the record regardless of the replace flag. The default is set to false.
Return Value:
Returns true if an add/replace operation is actually performed.
Exceptions:
Throws TDiskDictionaryPermissionsException::kReadOnly if the TDiskDictionaryOf was instantiated ReadOnly.
Throws a derived class of TPersistentStorageException if an internal failure occurred.
Concurrency:
Not multithread safe.
Other Considerations:
None.
AValue * Copy (const AKey & theKey) const
Interface Category:
API.
Purpose:
Copies a value object from the disk dictionary according to the specified key. Use this function when the Add function was used to store the value. If any other function was used to add the value, a TInvalidStreamData exception is thrown. The returned object is allocated on the same heap as this accessor.
Calling Context:
Called to copy a value object from the disk dictionary.
Parameters:
- const AKey & theKey -Specifies the key of the record to be retrieved.
Return Value:
Returns the value object associated with this key, or NIL if no value is found.
Exceptions:
Throws a derived class of TPersistentStorageException if an internal failure occurred.
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.