Class: TPropertyIDFor

Declaration: Property.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TPropertyID

Inherited By:

None.

Purpose:

This derived class provides an identifier bound to AType, where AType can be any of the portable primitive types or any class type that has the following public functions: AType (); AType (const AType& copy); HashResult Hash () const; bool operator ==(const AType& right) const; TStream& operator >>(TStream& toWhere) const; TStream& operator <<= (TStream& fromWhere); The primitive types supported are: signed char signed short signed long unsigned char unsigned short unsigned long double float

Instantiation:

Allocate on the heap or the stack. Safe to allocate at static constructor time.

Deriving Classes:

This class is not intended to be derived from.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TPropertyIDFor::TPropertyIDFor

  1. TPropertyIDFor (const TPropertyName & name, EValueFilter filter =kMonomorphicValues)
  2. TPropertyIDFor ()
  3. TPropertyIDFor (const TPropertyIDFor < AType > & copy)
  4. TPropertyIDFor (const TPropertyID & right)

Interface Category:

API.

Purpose:

  1. Constructs a property identifier with the specified name. Set filter to kMonomorphicValues when you want this identifier to name values of type AType only---set it to kPolymorphicValues to name values of type AType and derived classes of AType.
  2. Default constructor.
  3. Copy constructor.
  4. Determines if the type of its argument is equivalent to the type of this object, and if so, constructs an identifier with the content of the argument.

Calling Context:

  1. Call this function directly.
  2. Called by the stream-in operators and to create an instance to assign to.
  3. Call this function directly.
  4. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

  1. Throws no exceptions, passes all exceptions through.
  2. Throws no exceptions, passes all exceptions through.
  3. Throws no exceptions, passes all exceptions through.
  4. Throws TTypeMismatch when the argument cannot be converted to TPropertyFor < AType >.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPropertyIDFor::operator=

  1. TPropertyIDFor < AType > & operator =(const TPropertyIDFor < AType > & right)
  2. TPropertyIDFor < AType > & operator =(const TPropertyID & right)

Interface Category:

API.

Purpose:

  1. Assigns the contents of the argument to this object.
  2. Determines if the type of its argument is equivalent to the type of this object, and if so, assigns the contents of the argument to this object.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

  1. Throws no exceptions, passes all exceptions through.
  2. Throws TTypeMismatch when the argument cannot be converted to TPropertyFor < AType >.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPropertyIDFor::~TPropertyIDFor

~ TPropertyIDFor ()

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: TPropertyIDFor::operator==

  1. bool operator ==(const TPropertyID & right) const
  2. TPropertyQuery operator ==(const AType & right) const

Interface Category:

API.

Purpose:

  1. Determines if this property identifier is equal to its argument.
  2. Produces a query which, when evaluated against an MQueryTarget, does the following:
  3. -Using id, retrieves the associated value from the MQueryTarget. -If found, returns the result of: retrievedValue ==value. Think of the id as a placeholder for the retrieved value.

Calling Context:

  1. Called to test the equivalence of two objects.
  2. Called to produce a query object.

Parameters:

Return Value:

  1. Returns true if the objects are equal.
  2. The query.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

See global functions for more ways to construct query objects.

Member Function: TPropertyIDFor::operator!=

  1. bool operator != (const TPropertyID & right) const
  2. TPropertyQuery operator != (const AType & right) const

Interface Category:

API

Purpose:

  1. Determines if this property identifier is not equal to its argument.
  2. Produces a query which, when evaluated against an MQueryTarget, does the following:
  3. -Using id, retrieves the associated value from the MQueryTarget. -If found, returns the result of: retrievedValue != value. Think of the id as a placeholder for the retrieved value.

Calling Context:

  1. Called to test the inequality of two objects.
  2. Called to produce a query object.

Parameters:

Return Value:

  1. Returns true if the objects are not equal.
  2. The query.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

See global functions for more ways to construct query objects.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.