|
@ -9,15 +9,15 @@ |
|
|
|
|
|
|
|
|
// Gen-CID
|
|
|
// Gen-CID
|
|
|
// =======
|
|
|
// =======
|
|
|
// CIDG generates a C Interface Defintion file (json) given the inputs:
|
|
|
// Gen-CID generates a C Interface Defintion file (json) given the inputs:
|
|
|
// * headerfile
|
|
|
// * headerfile
|
|
|
// * list of function names needed
|
|
|
// * list of function names needed
|
|
|
// * list of var names needed
|
|
|
// * list of var names needed
|
|
|
// The generator searches each function/var in the headerfile (recursively) and collects all the
|
|
|
// The generator searches each function/var in the headerfile (recursively) and collects all the
|
|
|
// types needed (var type, return type, parm types).
|
|
|
// types needed (var type, return type, parm types).
|
|
|
// As structs can contain further types, these dependent types need to be resolved
|
|
|
// As structs can contain further types, these dependent types need to be collected
|
|
|
// recursively.
|
|
|
// recursively.
|
|
|
// Finally, the collected types will be resolved to their final underlying type.
|
|
|
// Finally, all the collected types will be resolved to their final underlying type.
|
|
|
// If a type is primitive, nothing needs to be done its already defined.
|
|
|
// If a type is primitive, nothing needs to be done its already defined.
|
|
|
// But types of typekind struct or enum need to be defined.
|
|
|
// But types of typekind struct or enum need to be defined.
|
|
|
// Their definition will be searched for in the headerfile and included in the interface definition
|
|
|
// Their definition will be searched for in the headerfile and included in the interface definition
|
|
|