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.
- TPropertyIDFor (const TPropertyName & name, EValueFilter filter =kMonomorphicValues)
- TPropertyIDFor ()
- TPropertyIDFor (const TPropertyIDFor < AType > & copy)
- TPropertyIDFor (const TPropertyID & right)
Interface Category:
API.
Purpose:
- 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.
- Default constructor.
- Copy constructor.
- 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:
- Call this function directly.
- Called by the stream-in operators and to create an instance to assign to.
- Call this function directly.
- Call this function directly.
Parameters:
- const TPropertyName & name -The name part of the property identifier.
- EvalueFilter filter =kMonomorphicValues -See TPropertyID::EValueFilter.
- Takes no parameters.
- const TPropertyIDFor < AType > & copy -The property identifier to copy.
- const TPropertyID & right -The property identifier to copy.
Return Value:
None.
Exceptions:
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, passes all exceptions through.
- Throws TTypeMismatch when the argument cannot be converted to TPropertyFor < AType >.
Concurrency:
Multithread safe.
Other Considerations:
None.
- TPropertyIDFor < AType > & operator =(const TPropertyIDFor < AType > & right)
- TPropertyIDFor < AType > & operator =(const TPropertyID & right)
Interface Category:
API.
Purpose:
- Assigns the contents of the argument to this object.
- 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:
- Call this function directly.
- Call this function directly.
Parameters:
- const TPropertyIDFor < AType > & right -The property identifier to copy.
- const TPropertyID & right -The property identifier to copy.
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
- Throws no exceptions, passes all exceptions through.
- Throws TTypeMismatch when the argument cannot be converted to TPropertyFor < AType >.
Concurrency:
Multithread safe.
Other Considerations:
None.
~ 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==
- bool operator ==(const TPropertyID & right) const
- TPropertyQuery operator ==(const AType & right) const
Interface Category:
API.
Purpose:
- Determines if this property identifier is equal to its argument.
- Produces a query which, when evaluated against an MQueryTarget, does the following:
-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:
- Called to test the equivalence of two objects.
- Called to produce a query object.
Parameters:
- const TPropertyID & right -The object to compare for equivalence.
- const AType & right -The value to compare against at the query evaluation.
Return Value:
- Returns true if the objects are equal.
- 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!=
- bool operator != (const TPropertyID & right) const
- TPropertyQuery operator != (const AType & right) const
Interface Category:
API
Purpose:
- Determines if this property identifier is not equal to its argument.
- Produces a query which, when evaluated against an MQueryTarget, does the following:
-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:
- Called to test the inequality of two objects.
- Called to produce a query object.
Parameters:
- const TPropertyID & right -The object to compare for inequality.
- const AType & right -The value to compare against at the query evaluation.
Return Value:
- Returns true if the objects are not equal.
- 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.