ICondition Interface

Provides methods for retrieving information about a search condition. An ICondition object represents the result of parsing an input string (using methods such as IQueryParser::Parse or IQuerySolution::GetQuery) into a tree of search condition nodes. A node can be a logical AND, OR, or NOT for comparing subnodes, or it can be a leaf node comparing a property and a constant value.

ICondition Members

Clone Creates a deep copy of this ICondition object.
GetComparisonInfo Retrieves the property name, operation, and value from a leaf search condition node.
GetConditionType Retrieves the condition type for this search condition node, identifying it as a logical AND, OR, or NOT, or as a leaf node.
GetInputTerms For a leaf node, ICondition::GetInputTerms retrieves information about what parts (or ranges) of the input string produced the property, the operation, and the value for the search condition node.
GetSubConditions Retrieves a collection of the subconditions of the search condition node and the IID of the interface for enumerating the collection.
GetValueNormalization Retrieves the character-normalized value of the search condition node.
GetValueType Retrieves the semantic type of the value of the search condition node.

Remarks

Prior to Windows 7, this interface was only declared in structuredquery.h and structuredquery.idl. In Windows 7, this interface is also defined in structuredquerycondition.idl and structuredquerycondition.h.

The StructuredQuerySample code sample, available on Code Gallery and the Windows 7 SDK, demonstrates how to read lines from the console, parse them using the system schema, and display the resulting condition trees.

Interface Information

Inherits from IPersistStream
Header and IDL files structuredquerycondition.h, structuredquerycondition.idl
Minimum operating systems Windows XP Service Pack 2 (SP2) with Windows Desktop Search (WDS) 3.0, Windows Server 2003 Service Pack 1 (SP1) with Windows Desktop Search (WDS) 3.0, Windows Vista, Windows 7

See Also

CONDITION_TYPE, CONDITION_OPERATION, ICondition2