Class: TPresenterSessionStore

Declaration: BasicDocumentStorage.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible, MPropertyStore

Inherited By:

TDocAttrPresenterSessionStore

Purpose:

TPresenterSessionStore provides an abstraction to identify storage for presentation specific data. TPresenterSessionStore derives from MPropertyStore and allows derived classes to store presentation data in properties. For example, a window presentation might store its size and position in a property.

Instantiation:

Abstract base class; don't allocate.

Deriving Classes:

Developers should not derive directly from this class, but rather from one of its derived classes provided by the Basic Document Framework. Provided classes include TDocAttrPresenterSessionStore. This class should be derived from to add protocols for compound document presenter information. Derived classes must override the pure virtual functions: Create, Delete, DoesExist, IsOpened, Open, Close, ReadAllPropertyIDs, ReadAllProperties, ReadProperties, WriteProperties, ReadProperty, WriteProperty, DeleteProperty, DeleteProperties, Member, SatisfiesQuery, GetPropertiesCount, and GetPropertiesSize.

Concurrency:

Multithread safe. This class enforces multiple readers or single writer semantics by delegating concurrency control to its storage mechanism.

Resource Use:

This class is responsible for managing its own resources.

Invariants:

Assertion (fStorageMechanism != NIL).

Member Function: TPresenterSessionStore::TPresenterSessionStore

  1. TPresenterSessionStore ()
  2. TPresenterSessionStore (const TPresenterSessionStore & copy);

Interface Category:

API.

Purpose:

  1. Default constructor. Used to resurrect a flattened store.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and derived class constructors.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

TPresenterSessionStore is an abstract base class--all the constructors are protected. Do not instantiate this class.

Member Function: TPresenterSessionStore::~TPresenterSessionStore

virtual ~ TPresenterSessionStore ()

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: TPresenterSessionStore::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: TPresenterSessionStore::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: TPresenterSessionStore::GetPropertiesSize

virtual unsigned long GetPropertiesSize () const

Interface Category:

API.

Purpose:

Returns the aggregate size of all properties associated with this object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the aggregate size of all properties associated with this object.

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

Member Function: TPresenterSessionStore::GetPropertiesCount

virtual unsigned long GetPropertiesCount () const

Interface Category:

API.

Purpose:

Returns the number of properties associated with this object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the number of properties associated with this object.

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

Member Function: TPresenterSessionStore::SatisfiesQuery

virtual bool SatisfiesQuery (const TPropertyQuery & query) const

Interface Category:

API.

Purpose:

Determines if this object satisfies the specified property query.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if this object satisfies the specified property query.

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

Member Function: TPresenterSessionStore::Member

virtual bool Member (const TPropertyID & id) const

Interface Category:

API.

Purpose:

Determines if this object has the specified property.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if this object has the specified property.

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

Member Function: TPresenterSessionStore::DeleteProperties

virtual bool DeleteProperties (const TPropertyIDSet & set)

Interface Category:

API.

Purpose:

Deletes all the properties named in its argument.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if all of the properties named in the set existed in the object. If any of the properties named in the set do not exist in this object, this function returns false after deleting all the existing named properties.

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

Member Function: TPresenterSessionStore::DeleteProperty

virtual bool DeleteProperty (const TPropertyID & id)

Interface Category:

API.

Purpose:

Deletes the specified property from this object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the specified property existed in this object.

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

Member Function: TPresenterSessionStore::WriteProperty

virtual void WriteProperty (const TProperty & property)

Interface Category:

API.

Purpose:

Writes the specified property. If the property already exists in TPresenterSessionStore, its value is overwritten. If the argument contains an invalid property, no operation is performed.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

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

Member Function: TPresenterSessionStore::ReadProperty

virtual bool ReadProperty (TProperty & fillin) const

Interface Category:

API.

Purpose:

Retrieves the property specified by the property identifier component of its argument, overwriting any existing value. If the property does not exist, fillin is marked invalid on return, and false is returned.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the specified property exists in this object.

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

Member Function: TPresenterSessionStore::WriteProperties

virtual void WriteProperties (const TPropertySet & properties)

Interface Category:

API.

Purpose:

Writes the specified properties. The value of any property that already exists in the TPresenterSessionStore is overwritten by the value in the set. Any property with an invalid value is ignored.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

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

Member Function: TPresenterSessionStore::ReadProperties

virtual bool ReadProperties (TPropertySet & fillin) const

Interface Category:

API.

Purpose:

Retrieves all properties named by the identifiers in the property set, overwriting any existing values in the set.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if all properties return valid values.

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 TPresenterSessionStore. If any requested property does not exist, it's value is marked invalid (subsequent calls to GetValue raise an exception) and false is returned.

Member Function: TPresenterSessionStore::ReadAllProperties

virtual void ReadAllProperties (TPropertySet & fillin) const

Interface Category:

API.

Purpose:

Retrieves all properties into the specified property set. Empties the set prior to retrieval.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

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

Member Function: TPresenterSessionStore::ReadAllPropertyIDs

virtual void ReadAllPropertyIDs (TPropertyIDSet & fillin) const

Interface Category:

API.

Purpose:

Retrieves all property identifiers into the specified property identifier set. Empties the set prior to retrieval.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

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

Member Function: TPresenterSessionStore::operator=

TPresenterSessionStore & operator =(const TPresenterSessionStore & copy)

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: TPresenterSessionStore::Close

virtual void Close ()

Interface Category:

API.

Purpose:

Closes access to the store.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

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

Member Function: TPresenterSessionStore::Open

virtual void Open ()

Interface Category:

API.

Purpose:

Opens the store.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

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

Member Function: TPresenterSessionStore::IsOpened

virtual bool IsOpened () const

Interface Category:

API.

Purpose:

Checks whether or not the store has been opened.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the store has already been opened; 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 TPresenterSessionStore.

Member Function: TPresenterSessionStore::DoesExist

virtual bool DoesExist ()

Interface Category:

API.

Purpose:

Checks whether or not an underlying physical storage implementation of a store 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 TPresenterSessionStore.

Member Function: TPresenterSessionStore::Delete

virtual void Delete ()

Interface Category:

API.

Purpose:

Deletes an underlying physical storage implementation of a store.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

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

Member Function: TPresenterSessionStore::Create

virtual void Create ()

Interface Category:

API.

Purpose:

Creates an underlying physical storage implementation of a store.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

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 TPresenterSessionStore.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.