IConditionFactory::MakeLeaf Method

Creates a leaf condition node that represents a comparison of property value and constant value.

Syntax

HRESULT MakeLeaf(      
    LPCWSTR pszPropertyName,
    CONDITION_OPERATION cop,
    LPCWSTR pszValueType,
    PROPVARIANT const *ppropvar,
    IRichChunk *pPropertyNameTerm,
    IRichChunk *pOperationTerm,
    IRichChunk *pValueTerm,
    BOOL fExpand,
    ICondition **ppResultQuery
);

Parameters

  • pszPropertyName
    [in, unique]  The name of a property to be compared, or NULL for an unspecified property. The locale name of the leaf node is LOCALE_NAME_USER_DEFAULT.
  • cop
    [in]  A CONDITION_OPERATION enumeration.
  • pszValueType
    [in, unique]  The name of a semantic type of the value, or NULL for a plain string.
  • ppropvar
    [in]  The constant value against which the property value should be compared.
  • pPropertyNameTerm
    [in]  A pointer to an IRichChunk that identifies the range of the input string that repesents the property. It can be NULL.
  • pOperationTerm
    [in]  A pointer to an IRichChunk that identifies the range of the input string that repesents the operation. It can be NULL.
  • pValueTerm
    [in]  A pointer to an IRichChunk that identifies the range of the input string that repesents the value. It can be NULL.
  • fExpand
    [in]  If TRUE and pszPropertyName identifies a virtual property, the resulting node is not a leaf node; instead, it is a disjunction of leaf condition nodes, each of which corresponds to one expansion of the virtual property.
  • ppResultQuery
    [out, retval]  Receives a pointer to the new ICondition leaf node.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

For more information about leaf node terms (property, value, and operation), see ICondition::GetInputTerms.

A virtual property has one or more metadata items in which the key is "MapsToRelation" and the value is a property name (which is one expansion of the property). For more information about metadata, see IRelationship::MetaData.

See Also

IConditionFactory, CONDITION_TYPE, CONDITION_OPERATION, IConditionFactory2, ICondition, ICondition2