Class: TChildStandardStorageMechanism

Declaration: BasicDocumentStorage.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TMultiBinStorageMechanism

Inherited By:

None.

Purpose:

TChildStandardStorageMechanism is a TMultiBinStorageMechanism derived class which uses a TStandardStorageMechanism's storage for child stores, such as TDocumentComponentStore. Many child stores may exist for a single TStandardStorageMechanism. Each must have a unique name.

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 TChildStandardStorageMechanism.

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:

TChildStandardStorageMechanism is responsible for managing its resources.

Invariants:

Assertion (fHandle != NIL).

Member Function: TChildStandardStorageMechanism::TChildStandardStorageMechanism

  1. TChildStandardStorageMechanism (const TStandardStorageMechanism & parent, const TText & name)
  2. TChildStandardStorageMechanism (const TChildStandardStorageMechanism &)

Interface Category:

API.

Purpose:

  1. Creates a child storage mechanism in the specified parent with the specified name.
  2. Copy constructor.

Calling Context:

  1. Called to create a child storage mechanism.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TChildStandardStorageMechanism::~TChildStandardStorageMechanism

virtual ~ TChildStandardStorageMechanism ()

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.

Member Function: TChildStandardStorageMechanism::operator=

TChildStandardStorageMechanism & operator =(const TChildStandardStorageMechanism &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

Returns a const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TChildStandardStorageMechanism::GetAccessMode

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.

Member Function: TChildStandardStorageMechanism::Create

virtual void Create ()

Interface Category:

API.

Purpose:

Provides concrete implementation of inherited TStorageMechanism function.

Calling Context:

Called to create an underlying physical storage implementation.

Parameters:

Return Value:

None.

Exceptions:

Throws TDocumentException::kStoreDoesNotExist if the store does not already exists.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TChildStandardStorageMechanism::CreateIn

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.

Member Function: TChildStandardStorageMechanism::CopyInto

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.

Member Function: TChildStandardStorageMechanism::MoveInto

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.

Member Function: TChildStandardStorageMechanism::Delete

virtual void Delete ()

Interface Category:

API.

Purpose:

Provides concrete implementation of inherited TStorageMechanism function.

Calling Context:

Called to delete an underlying physical storage implementation.

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).

Member Function: TChildStandardStorageMechanism::DoesExist

virtual bool DoesExist () const

Interface Category:

API.

Purpose:

Provides concrete implementation of inherited TStorageMechanism function.

Calling Context:

Called to check whether or not an underlying physical storage implementation exists.

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.

Member Function: TChildStandardStorageMechanism::DoesExistIn

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 ).

Member Function: TChildStandardStorageMechanism::IsOpened

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.

Member Function: TChildStandardStorageMechanism::Open

virtual void Open (EAccessMode)

Interface Category:

API.

Purpose:

Provides concrete implementation of inherited TStorageMechanism function.

Calling Context:

Called to open the storage mechanism.

Parameters:

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).

Member Function: TChildStandardStorageMechanism::Close

virtual void Close ()

Interface Category:

API.

Purpose:

Provides concrete implementation of inherited TStorageMechanism function.

Calling Context:

Called to close the storage mechanism.

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).

Member Function: TChildStandardStorageMechanism::CanBitWiseCopy

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).

Member Function: TChildStandardStorageMechanism::GetName

void GetName (TText &) const

Interface Category:

API.

Purpose:

Gets the storage mechanism's name. The name is set during construction.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TChildStandardStorageMechanism::GetParent

void GetParent (TStandardStorageMechanism &) 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.

Member Function: TChildStandardStorageMechanism::AddAttribute

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Postconditions: Assertion (CopyAttribute(const TDocumentAttribute) != NIL).

Member Function: TChildStandardStorageMechanism::DeleteAttribute

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Postconditions: Assertion (CopyDocumentAttribute(const TDocumentReference&, const TDocumentAttribute) ==NIL).

Member Function: TChildStandardStorageMechanism::CopyAttribute

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:

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.

Member Function: TChildStandardStorageMechanism::DeleteAllAttributes

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.

Member Function: TChildStandardStorageMechanism::CopyAllAttributes

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:

Return Value:

None

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TChildStandardStorageMechanism::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

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.

Member Function: TChildStandardStorageMechanism::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

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.

Member Function: TChildStandardStorageMechanism::Hash

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.

Member Function: TChildStandardStorageMechanism::IsEqual

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:

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.