![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TStorageMechanism
Inherited By:
None.
Purpose:
TSingleBinStorageMechanism is a TStorageMechanism derived class which adds the API to manage a single storage bin.
Instantiation:
TSingleBinStorageMechanism is an abstract base class and only instantiated as part of a derived class.
Deriving Classes:
This is an abstract base class. Derived classes must implement the protocol defined by this class. Derived classes must override the pure virtual functions: CreateStorageBin, DeleteStorageBin, DoesStorageBinExist, OpenStorageBin, and CloseStorageBin.
TDOSStorageMechanism is a possible derived class using DOS file system entities.
Concurrency:
Multithread safe.
Concurrency among threads within a team is provided by the shared hidden master. Concurrency between teams is provided by the underlying service used to implement the storage mechanism. In both cases, the semantics of multiple readers, or single writer will be enforced.
Resource Use:
TSingleBinStorageMechanism is abstract and always created and deleted as part of a derived class.
virtual ~ TSingleBinStorageMechanism ()
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 void CreateStorageBin ()
Interface Category:
API.
Purpose:
Creates an underlying physical storage implementation of the storage bin.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws TDocumentException::kDocumentStoreBinAlreadyExists.
Concurrency:
Multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism.
Preconditions:
Assertion (an underlying physical storage implementation of the storage mechanism exists).
Assertion (an underlying physical storage implementation of the storage bin does not exist).
Postconditions:
Assertion (an underlying physical storage implementation of the storage bin exists).
virtual void DeleteStorageBin ()
Interface Category:
API.
Purpose:
Deletes an underlying physical storage implementation of the storage bin.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws TDocumentException::kDocumentStoreBinDoesNotExist.
Concurrency:
Multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism.
Preconditions:
Assertion (an underlying physical storage implementation of the storage mechanism exists).
Assertion (an underlying physical storage implementation of the storage bin exists).
Postconditions:
Assertion (an underlying physical storage implementation of the storage bin no longer exists).
virtual bool DoesStorageBinExist ()
Interface Category:
API.
Purpose:
Checks whether an underlying physical storage implementation of the storage bin exists.
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:
This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism.
Preconditions:
Assertion (an underlying physical storage implementation of the storage mechanism exists).
virtual TRandomAccessStream* OpenStorageBin (EAccessMode mode)
Interface Category:
API.
Purpose:
Opens the storage bin.
Calling Context:
Call this function directly.
Parameters:
- EAccessMode mode -The access mode for the storage bin.
Return Value:
Returns a random-access stream for accessing the storage bin.
Exceptions:
Throws TDocumentException::kDocumentStoreBinAccessDenied.
Concurrency:
Multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism.
Preconditions:
Assertion (an underlying physical storage implementation of the storage mechanism exists).
Assertion (an underlying physical storage implementation of the storage bin exists).
Postconditions:
Assertion (storage bin is opened with specified access mode).
virtual void CloseStorageBin ()
Interface Category:
API.
Purpose:
Closes the storage bin.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws TDocumentException::kDocumentStoreBinDoesNotExist.
Concurrency:
Multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism.
Preconditions:
Assertion (an underlying physical storage implementation of the storage mechanism exists).
Assertion (an underlying physical storage implementation of the storage bin exists).
Postconditions:
Assertion (storage bin is closed).
- TSingleBinStorageMechanism ()
- TSingleBinStorageMechanism (const TSingleBinStorageMechanism &)
Interface Category:
API.
Purpose:
- Default constructor. Used to resurrect a flattened storage mechanism.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and derived class constructors.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
TSingleBinStorageMechanism is an abstract base class--all the constructors are protected. Do not instantiate this class.
TSingleBinStorageMechanism & operator =(const TSingleBinStorageMechanism &)
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:
TSingleBinStorageMechanism is an abstract base class--all the constructors are protected. Do not instantiate this class.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.