import { DrawingID, ObjectID, ObjectIdent } from '@buerli.io/core'; import { CCClasses, IStructureTree } from '../../re-export'; /** * Checks if the given class is equal to the provided type or derives from it. * * @param objClass The class to check. * @param type The type to be checked for. * @returns true if objClass is of type or derived from type, false else. */ export declare const isA: (objClass?: string, type?: CCClasses) => boolean; /** * Gets all children of the given object with the provided type. * * @param objId The id of the object to get children from. * @param type The type of children to search for. * @param tree The structure tree. * @returns An array of object ids of the found children. */ export declare const getChildren: (objId: ObjectID, type: CCClasses, tree: IStructureTree) => ObjectID[]; /** * Searches for an object's ancestor of specified class. * @param drawingId The drawing id. * @param objectId The id of the object to search for its ancestor. * @param parentClass The CCClass of the ancestor to search for. * @returns first found object of specified class. */ export declare const getAncestorIdByClass: (drawingId: DrawingID, objectId: ObjectID, parentClass: CCClasses) => number | null; /** * Gets all ancestors of the given object. * @param drawingId The drawing id. * @param objectId The id of the object to get ancestors from. * @returns an array of object's ancestors. */ export declare const getAncestors: (drawingId: DrawingID, objectId: ObjectID) => number[]; /** * Gets all descendants of the given object. * @param drawingId The drawing id. * @param objectId The id of the object to get descendants from. * @returns an array of object's descendants. */ export declare const getDescendants: (drawingId: DrawingID, objectId: ObjectID) => number[]; /** * Find first object which can be identified by given identifier or name. * If both optional parameters has been set, the identifier is treated with priority. * If no object with given identifier will be found, the name is used to find an object, if available. * @param drawingId The drawing id. * @param options Optional parameters to identify to find object. * @param options.ident Identifier to find the object by an identifier * @param options.name Name to find the object by its name * @returns first found object which meets the searching conditions */ export declare const findObject: (drawingId: DrawingID, options: { ident?: ObjectIdent; name?: string; }) => ObjectID | undefined;