import { dxfHeader, dxfJson, dxfHeaderKeys, numberTriplet, numberPair, xyzTriplet, xyPair, dxfTables, dxfBlock, dxfViewportContainer, dxfViewport, dxfLineTypeContainer, lineTypeObject, dxfLayerContainer, layerObject, blockTypeObject, dxfEntity } from './dxf'; export default class JsonParser { constructor(); /** * parseJson turns a dxfJson into a string array representing the json in * dxf format * @param dxf the JSON object to turn into a dxf */ parseJson(dxf: dxfJson): string[]; /** * parseEntities parses the entity block of the dxfJson and returns a * whole section * @param entities the entities to convert */ parseEntities(entities: dxfEntity[]): string[]; /** * parseEntityObjects iterates over the dxfEntity objects and turns them * into string arrays * @param entities the entities to convert */ parseEntityObjects(entities: dxfEntity[]): string[]; /** * parseBlocks parses the blocks block of the dxfJson and returns a whole * section * @param blocks the blocks to convert */ parseBlocks(blocks: blockTypeObject): string[]; /** * parseBlocksObject iterates over the blockTypeObjects and turns them into * string arrays * @param blocks the blocks to convert */ parseBlocksObject(blocks: blockTypeObject): string[]; /** * parseTables parses the tables block of the dxfJson and returns a whole * section * @param tables the tables to convert */ parseTables(tables: dxfTables): string[]; /** * parseLayerContainer processes the layer table * @param layer the layer container object */ parseLayerContainer(layer: dxfLayerContainer): string[]; /** * parseLayers iterates over the dxfLayer objects and turns them into * string arrays * @param layerObject the layer map object * @param handle the handle for the layer object */ parseLayers(layerObject: layerObject, handle: string): string[]; /** * parseLineTypeContainer processes the lineType table * @param layer the lineType container object */ parseLineTypeContainer(lineType: dxfLineTypeContainer): string[]; /** * parseLineTypes iterates over the dxfLineType objects and turns them * into string arrays * @param lineTypeObject the lineType map object * @param handle the handle for the lineType object */ parseLineTypes(lineTypeObject: lineTypeObject, handle: string): string[]; /** * parseViewPortContainer processes the viewport table * @param viewPort the viewport container object */ parseViewPortContainer(viewPort: dxfViewportContainer): string[]; /** * parseViewPorts iterates over the dxfViewport objects and turns them * into string arrays * @param viewPorts the viewports to convert * @param handle the handle for the viewport object */ parseViewPorts(viewPorts: dxfViewport[], handle: string): string[]; /** * writePair takes the strings that should preceed each value of a pair * and writes a 4 length string array * @param xString the string to preceed the x value * @param yString the string to preceed the y value * @param pair the pair to write */ writePair(xString: string, yString: string, pair: xyPair): string[]; /** * writeTriplet takes the strings that should preceed each value of a triplet * and writes a 6 length string array * @param xString the string to preceed the x value * @param yString the string to preceed the y value * @param zString the string to preceed the z value * @param triplet the triple to write */ writeTriplet(xString: string, yString: string, zString: string, triplet: xyzTriplet): string[]; /** * writeBlockValues is a utility method to read a block and write the basic * values to a string array * @param block the block element */ writeBlockValues(block: dxfBlock): string[]; /** * parseHeader iterates over the keys in the header and writes out the * string array for each value using the getHeaderValueString method * @param header the header section */ parseHeader(header: dxfHeader): string[]; /** * getHeaderValueString checks the type for this key and returns a string array containing the type(s) and the value(s) based on the type * @param type the type for this key * @param value the value from the json */ getHeaderValueString(type: number | numberPair | numberTriplet, value: string | number | boolean | xyzTriplet | xyPair | undefined): string[]; } /** * dxfHeaderGroupType provides a mapping of values for use in constructing the header */ export declare const dxfHeaderGroupType: { [key in dxfHeaderKeys]: number | numberPair | numberTriplet; };