/** @packageDocumentation * @module Topology */ /** * Methods to "grab and drop" mask bits from a 32-bit field. * * Caller code (e.g. HalfEdgeGraph) initializes with a block of bits to be managed. * * Callers borrow and return masks with "grabMask" and "dropMask". * * Callers must exercise grab/drop balance discipline. * @internal */ export declare class MaskManager { private _freeMasks; private _originalFreeMasks; private _firstFreeMask; /** * Constructor * @param freeMasks caller-defined block of bits that are to be managed. * @param firstFreeMask the first free mask in the freeMasks bits block. */ private constructor(); /** * Create a MaskManager. * Typical use: MaskManager.create(0xFFF00000) * * This makes bits 20 through 31 available to be borrowed, with lower bits reserved for fixed usage. * @param freeMasks mask with bits set to be available for grab/drop. * @returns undefined if `freeMasks` has none of the bits [0,31] set. */ static create(freeMasks: number): MaskManager | undefined; /** Find a mask bit that is not "in use" in order to borrow that mask. */ grabMask(): number; /** Return the borrowed mask so it is not "in use" anymore. */ dropMask(mask: number): void; /** Whether there is a mask bit still available to grab. */ get hasFreeMask(): boolean; } //# sourceMappingURL=MaskManager.d.ts.map