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).
- TPresenterSessionStore ()
- TPresenterSessionStore (const TPresenterSessionStore & copy);
Interface Category:
API.
Purpose:
- Default constructor. Used to resurrect a flattened store.
- 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:
TPresenterSessionStore is an abstract base class--all the constructors are protected. Do not instantiate this class.
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.
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 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.
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.
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:
- const TPropertyQuery & query -Represents the property query to run on this object.
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.
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:
- const TPropertyID & id -The identifier of the property to look up.
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.
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:
- const TPropertyIDSet & set -The set of properties to delete from this object.
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.
virtual bool DeleteProperty (const TPropertyID & id)
Interface Category:
API.
Purpose:
Deletes the specified property from this object.
Calling Context:
Call this function directly.
Parameters:
- const TPropertyID & id -The identifier of the property to be deleted.
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.
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:
- const TProperty & property -The property to write.
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.
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:
- TProperty & fillin -The property to retrieve. On return, contains the property.
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.
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:
- const TPropertySet & properties -The set of properties to write.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.