Class: MPropertyStore

Declaration: Property.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MPropertySource

Inherited By:

TFileSystemEntity TPresenterSessionStore

Purpose:

An abstract class that provides the protocol for storing and retrieving properties. A derived class of MPropertyStore can impose restrictions on some or all of the properties they store. A derived class can: - Define some or all of the properties it stores. - Define some or all of the properties it stores to be immutable. - Define some or all of the properties it stores to be monomorphic. - Define some or all of the properties it stores to be polymorphic. - Define properties to be mutable only by functions other than those in MPropertyStore. - Impose restrictions on the size and/or the number of properties it stores. Exceptions to these rules are dictated by the provider of the MPropertyStore derived class.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Must override all functions. This class can be mixed-in to any class that wants to support properties.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: MPropertyStore::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:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::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:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::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:

Not multithread safe.

Other Considerations:

If any requested property does not exist, its value is marked invalid (subsequent calls to GetValue/CopyValue raise an exception) and false is returned.

Member Function: MPropertyStore::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 MPropertyStore 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:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::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:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::WriteProperty

virtual void WriteProperty (const TProperty & property)

Interface Category:

API.

Purpose:

Writes the specified property. If the property already exists in MPropertyStore, 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:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::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:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::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:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::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:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::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:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::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:

The number of properties associated with this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MPropertyStore::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:

The aggregate size of all properties associated with this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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