UNPKG

@foxglove/omgidl-parser

Version:

Parse OMG IDL to flattened definitions for serialization

32 lines 1.9 kB
import { IDLNode } from "./IDLNode"; import { AnyIDLNode, IReferenceTypeIDLNode } from "./interfaces"; import { BaseASTNode, StructMemberASTNode, TypedefASTNode } from "../astTypes"; /** Class used for struct members and typedefs because they can reference each other and other types (enum and struct) * This class resolves the fields of these types to their final values. */ export declare abstract class ReferenceTypeIDLNode<T extends TypedefASTNode | StructMemberASTNode> extends IDLNode<T> implements IReferenceTypeIDLNode<T> { /** Indicates that it references another typedef, enum or struct. (ie: uses a non-builtin / simple type) */ private typeNeedsResolution; /** Used to hold an optional referenced node if needsResolution==true. Resolved/Set with `typeRef()` function. * Not meant to be used outside of `typeRef()` function. */ private typeRefNode?; constructor(scopePath: string[], astNode: T, idlMap: Map<string, AnyIDLNode>); get type(): string; get isComplex(): boolean; get enumType(): string | undefined; get isArray(): boolean | undefined; get arrayLengths(): number[] | undefined; get arrayUpperBound(): number | undefined; get upperBound(): number | undefined; get annotations(): BaseASTNode["annotations"]; private resolvePossibleNumericConstantUsage; /** Gets Node with the given name in the current instance's scope and checks that it is a valid type reference node */ private getValidTypeReference; /** Resolves to a type reference node value or fails if one is not found. * Only to be used when needsResolution==true and the `type` on the astNode is not "simple". * Also checks the parent against current serialization limitations. (ie: we do not support composing variable length arrays with typedefs) */ private typeRef; } //# sourceMappingURL=ReferenceTypeIDLNode.d.ts.map