Home Page > KernelCAD Components > Interface Queries
Query Path
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
in KernelCAD software. 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: KernelCAD->GetModel()->IModel->GetSection()->ISection->IMaterial.
Note that the result of a query can depend on the query
path. For example for a Generic 3D Object path ISection->
IArray
returns IArray of its child sections, but path ISection->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.
See also IArray, IAxiBase
|