Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TMultiBinStorageMechanism
Inherited By:
None.
Purpose:
TStandardStorageMechanism is a TMultiBinStorageMechanism derived class which uses Pluto file system entities to maintain the data. Each storage bin may correspond to a Pluto file. The collection of storage bins within a storage mechanism corresponds to a Pluto directory.
Instantiation:
A standard storage mechanism should be allocated on the heap and given to its associated store in the constructor of the store.
Deriving Classes:
Do not derive from TStandardStorageMechanism.
Concurrency:
Multithread safe.
Concurrency among threads within a team is provided by the shared hidden master. Concurrency between teams is provided by by Pluto file system entities. In both cases, the semantics of multiple readers, or single writer will be enforced.
Resource Use:
TStandardStorageMechanism is responsible for managing its resources.
Invariants:
Assertion (fHandle != NIL).
- TStandardStorageMechanism (const TDirectory & parent, const TFileSystemEntityName & name)
- TStandardStorageMechanism (const TStandardStorageMechanism &)
Interface Category:
API.
Purpose:
- Creates a storage mechanism instance with the specified parent and name.
- Copy constructor.
Calling Context:
- Called to create a storage mechanism instance.
- Called to copy an object.
Parameters:
- const TDirectory & parent -The new storage mechanism's parent.
- const TFileSystemEntityName& name -The name of the storage mechanism.
- const TStandardStorageMechanism & -The storage mechanism to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual ~ TStandardStorageMechanism ()
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:
Multithread safe.
Other Considerations:
None.
virtual EAccessMode GetAccessMode() const
Interface Category:
API.
Purpose:
Returns the open access mode. This value is not meaningful unless the mechanism is opened.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the access mode.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Create ()
Interface Category:
API.
Purpose:
Provides concrete implementation of inherited TStorageMechanism function.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws TDocumentException::kDocumentStoreAlreadyExists if the store already exists.
Concurrency:
Multithread safe.
Other Considerations:
Preconditions:
Assertion (an underlying physical storage implementation does not exist).
Postconditions:
Assertion (an underlying physical storage implementation exists).
virtual void CreateIn (TStorageMechanism & parent)
Interface Category:
API.
Purpose:
Provides concrete implementation of inherited TMultiBinStorageMechanism function.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TMultiBinStorageMechanism * CopyInto (TStorageMechanism & parent)
Interface Category:
API.
Purpose:
Provides concrete implementation of inherited TMultiBinStorageMechanism function.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the copy.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void MoveInto (TStorageMechanism & parent)
Interface Category:
API.
Purpose:
Provides concrete implementation of inherited TMultiBinStorageMechanism function.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Delete ()
Interface Category:
API.
Purpose:
Provides concrete implementation of inherited TStorageMechanism function.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws TDocumentException::kDocumentStoreDoesNotExist.
Concurrency:
Multithread safe.
Other Considerations:
Preconditions:
Assertion (an underlying physical storage implementation exists).
Postconditions:
Assertion (an underlying physical storage implementation no longer exists).
virtual bool DoesExist () const
Interface Category:
API.
Purpose:
Provides concrete implementation of inherited TStorageMechanism function.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if an underlying physical storage implementation exists; false otherwise
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Open (EAccessMode)
Interface Category:
API.
Purpose:
Provides concrete implementation of inherited TStorageMechanism function.
Calling Context:
Call this function directly.
Parameters:
- EAccessMode -The access mode for the storage mechanism.
Return Value:
None.
Exceptions:
Throws TDocumentException::kDocumentStoreAccessDenied.
Concurrency:
Multithread safe.
Other Considerations:
Preconditions:
Assertion (an underlying physical storage implementation exists).
Postconditions:
Assertion (storage mechanism is opened with specified access mode).
virtual void Close ()
Interface Category:
API.
Purpose:
Provides concrete implementation of inherited TStorageMechanism function.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws TDocumentException::kDocumentStoreDoesNotExist.
Concurrency:
Multithread safe.
Other Considerations:
Preconditions:
Assertion (an underlying physical storage implementation exists).
Postconditions:
Assertion (storage mechanism is closed).
virtual bool CanBitWiseCopy ()
Interface Category:
API.
Purpose:
Provides concrete implementation of inherited TStorageMechanism function.
Calling Context:
Called to check whether or not a store supports bit-wise copying.
Parameters:
Return Value:
Returns true if a storage mechanism supports bit-wise copying; false otherwise.
Exceptions:
Throws TDocumentException::kDocumentStoreDoesNotExist.
Concurrency:
Multithread safe.
Other Considerations:
Preconditions:
Assertion (an underlying physical storage implementation exists).
virtual void AddAttribute (const TDocumentAttribute & theAttribute)
Interface Category:
API.
Purpose:
Adds the attribute to the storage mechanism's attribute list replacing a matching attribute if one exists.
Calling Context:
Call this function directly.
Parameters:
- const TDocumentAttribute & theAttribute -The attribute to add.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
Postconditions:
Assertion (CopyAttribute(const TDocumentAttribute) != NIL).
virtual void DeleteAttribute (const TDocumentAttribute & thePatternToMatch)
Interface Category:
API.
Purpose:
Deletes the attribute from the storage mechanism's attribute list if it exists.
Calling Context:
Call this function directly.
Parameters:
- const TDocumentAttribute & thePatternToMatch -The attribute to delete.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
Postconditions:
Assertion (CopyDocumentAttribute(const TDocumentReference&, const TDocumentAttribute) ==NIL).
virtual TDocumentAttribute * CopyAttribute (const TDocumentAttribute & thePatternToMatch) const
Interface Category:
API.
Purpose:
Copies a specific attribute from the storage mechanism if it exists.
Calling Context:
Call this function directly.
Parameters:
- const TDocumentAttribute & thePatternToMatch -The attribute to copy.
Return Value:
Returns the copied attribute or NIL if attribute did not exist for specified document.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void DeleteAllAttributes ()
Interface Category:
API.
Purpose:
Deletes all the attributes for the storage mechanism.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
Postconditions:
Assertion (CopyAttribute(TDocumentAttribute&) ==NIL) for all attributes.
virtual void CopyAllAttributes (TCollectionOf<TDocumentAttribute> &) const
Interface Category:
API.
Purpose:
Copies all the attributes for the storage mechanism.
Calling Context:
Call this function directly.
Parameters:
- TCollectionOf<TDocumentAttribute> & -The collection to fill with copied attributes.
Return Value:
None
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & -The stream to which the object streams itself out.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & -The stream from which the object streams itself in.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual long Hash () const
Interface Category:
API.
Purpose:
Overrides inherited MCollectible function to return hash value.
Calling Context:
Called by collection classes.
Parameters:
Return Value:
Returns hash value.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
TStandardStorageMechanism & operator =(const TStandardStorageMechanism &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
TDirectory GetDirectory () const
Interface Category:
API.
Purpose:
Returns the storage mechanism's directory. The directory is established during construction.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the storage mechanism's directory.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
TDirectory GetParent () const
Interface Category:
API.
Purpose:
Returns the storage mechanism's parent. The parent is set during construction.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the storage mechanism's parent.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
void GetName (TFileSystemEntityName &) const
Interface Category:
API.
Purpose:
Gets the storage mechanism's name. The name is set during construction.
Calling Context:
Call this function directly.
Parameters:
- TFileSystemEntityName & -The name as returned by this function.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool IsOpened () const
Interface Category:
API.
Purpose:
Checks whether the storage mechanism is opened.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the mechanism is opened; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool DoesExistIn (const TStorageMechanism & parent) const
Interface Category:
API.
Purpose:
Determines whether or not this storage mechanism exists in the specified parent.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if this storage mechanism exists in the specified parent; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
Precondition:
Assertion( GetStorageMechanism() != NIL ).
Assertion( parent.GetStorageMechanism() != NIL ).
virtual bool IsEqual (const MCollectible *) const
Interface Category:
API.
Purpose:
Tests two objects for equality. Overrides inherited MCollectible function.
Calling Context:
Called by collection classes.
Parameters:
- const MCollectible * -The object to be compared with this one.
Return Value:
Returns true if the objects are equal; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
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.