Interface Queries
Operation of obtaining and interface from an object with QueryInterface() in
C++ or coercion/cast in other languages or with a call to some method like GetModel() is called Simple Query
. Normally to get access to a specific functionality it is
needed to traverse several levels in the hierarchy
of interfaces.
Such a
sequence of simple queries is called extended query (or just query). Its
description in textual form is called query path.
Sample of a query path: DG Kernel > GetModel()
> IModel > IModel_DG > GetEntityAt() > IEntity_DG
In some (rare) situations, the result of a query can depend on the query
path.
For example for an entity with 3DS geometry,
path IEntity_DG > IArray
returns IArray of its child entities, but path IEntity_DG
> IAxiBase
> IArray
returns IArray of its base knots.
Such queries are called Context-Dependent Query
Description of specific interfaces describes situations when the interface
can be involved in a context-dependent query. Context-dependent queries should
be carried out without any other queries from the involved interfaces. Specific
cases may have alleviations of this rule.
|