@itwin/core-orbitgt 5.0.0-dev.4 → 5.0.0-dev.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/lib/cjs/pointcloud/format/opc/BlockRecord.js +2 -2
  3. package/lib/cjs/pointcloud/format/opc/BlockRecord.js.map +1 -1
  4. package/lib/cjs/pointcloud/format/opc/ContainerFile.js +2 -2
  5. package/lib/cjs/pointcloud/format/opc/ContainerFile.js.map +1 -1
  6. package/lib/cjs/pointcloud/format/opc/FileReader.js +2 -2
  7. package/lib/cjs/pointcloud/format/opc/FileReader.js.map +1 -1
  8. package/lib/cjs/pointcloud/format/opc/GeometryReader.js +6 -6
  9. package/lib/cjs/pointcloud/format/opc/GeometryReader.js.map +1 -1
  10. package/lib/cjs/pointcloud/format/opc/TileRecord.js +2 -2
  11. package/lib/cjs/pointcloud/format/opc/TileRecord.js.map +1 -1
  12. package/lib/cjs/pointcloud/model/AttributeTypes.js +16 -16
  13. package/lib/cjs/pointcloud/model/AttributeTypes.js.map +1 -1
  14. package/lib/cjs/pointcloud/model/AttributeValue.js +4 -4
  15. package/lib/cjs/pointcloud/model/AttributeValue.js.map +1 -1
  16. package/lib/cjs/pointcloud/model/CloudPoint.js +2 -2
  17. package/lib/cjs/pointcloud/model/CloudPoint.js.map +1 -1
  18. package/lib/cjs/pointcloud/model/PointDataRaw.js +2 -2
  19. package/lib/cjs/pointcloud/model/PointDataRaw.js.map +1 -1
  20. package/lib/cjs/pointcloud/model/ReadRequest.js +6 -6
  21. package/lib/cjs/pointcloud/model/ReadRequest.js.map +1 -1
  22. package/lib/cjs/pointcloud/model/StandardAttributes.js +21 -21
  23. package/lib/cjs/pointcloud/model/StandardAttributes.js.map +1 -1
  24. package/lib/cjs/pointcloud/render/DataManager.js +6 -6
  25. package/lib/cjs/pointcloud/render/DataManager.js.map +1 -1
  26. package/lib/cjs/pointcloud/render/TileLoadSorter.js +2 -2
  27. package/lib/cjs/pointcloud/render/TileLoadSorter.js.map +1 -1
  28. package/lib/cjs/pointcloud/render/ViewTree.js +4 -4
  29. package/lib/cjs/pointcloud/render/ViewTree.js.map +1 -1
  30. package/lib/cjs/spatial/crs/CRSManager.js +2 -2
  31. package/lib/cjs/spatial/crs/CRSManager.js.map +1 -1
  32. package/lib/cjs/spatial/ecrs/CRS.js +34 -34
  33. package/lib/cjs/spatial/ecrs/CRS.js.map +1 -1
  34. package/lib/cjs/spatial/ecrs/CoordinateSystem.js +2 -2
  35. package/lib/cjs/spatial/ecrs/CoordinateSystem.js.map +1 -1
  36. package/lib/cjs/spatial/ecrs/DataFileUnit.js +1 -1
  37. package/lib/cjs/spatial/ecrs/DataFileUnit.js.map +1 -1
  38. package/lib/cjs/spatial/ecrs/Datum.js +4 -4
  39. package/lib/cjs/spatial/ecrs/Datum.js.map +1 -1
  40. package/lib/cjs/spatial/ecrs/OnlineRegistry.js +2 -2
  41. package/lib/cjs/spatial/ecrs/OnlineRegistry.js.map +1 -1
  42. package/lib/cjs/spatial/ecrs/Operation.js +6 -6
  43. package/lib/cjs/spatial/ecrs/Operation.js.map +1 -1
  44. package/lib/cjs/spatial/ecrs/Registry.js +17 -17
  45. package/lib/cjs/spatial/ecrs/Registry.js.map +1 -1
  46. package/lib/cjs/spatial/ecrs/Transform.js +11 -11
  47. package/lib/cjs/spatial/ecrs/Transform.js.map +1 -1
  48. package/lib/cjs/spatial/ecrs/Unit.js +24 -24
  49. package/lib/cjs/spatial/ecrs/Unit.js.map +1 -1
  50. package/lib/cjs/spatial/ecrs/WellKnownText.js +8 -8
  51. package/lib/cjs/spatial/ecrs/WellKnownText.js.map +1 -1
  52. package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js +2 -2
  53. package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
  54. package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js +2 -2
  55. package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
  56. package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js +2 -2
  57. package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
  58. package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js +2 -2
  59. package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
  60. package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js +6 -6
  61. package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
  62. package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js +4 -4
  63. package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
  64. package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js +4 -4
  65. package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
  66. package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js +4 -4
  67. package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
  68. package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js +4 -4
  69. package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
  70. package/lib/cjs/spatial/ecrs/transformation/PositionVector.js +2 -2
  71. package/lib/cjs/spatial/ecrs/transformation/PositionVector.js.map +1 -1
  72. package/lib/cjs/system/buffer/Float32Buffer.js +2 -2
  73. package/lib/cjs/system/buffer/Float32Buffer.js.map +1 -1
  74. package/lib/cjs/system/buffer/Uint16Buffer.js +2 -2
  75. package/lib/cjs/system/buffer/Uint16Buffer.js.map +1 -1
  76. package/lib/cjs/system/buffer/Uint8Buffer.js +2 -2
  77. package/lib/cjs/system/buffer/Uint8Buffer.js.map +1 -1
  78. package/lib/cjs/system/runtime/ALong.js +26 -26
  79. package/lib/cjs/system/runtime/ALong.js.map +1 -1
  80. package/lib/cjs/system/runtime/ASystem.js +1 -1
  81. package/lib/cjs/system/runtime/ASystem.js.map +1 -1
  82. package/lib/cjs/system/runtime/Downloader.js +2 -2
  83. package/lib/cjs/system/runtime/Downloader.js.map +1 -1
  84. package/lib/cjs/system/runtime/Message.js +2 -2
  85. package/lib/cjs/system/runtime/Message.js.map +1 -1
  86. package/lib/cjs/system/runtime/Numbers.js +6 -6
  87. package/lib/cjs/system/runtime/Numbers.js.map +1 -1
  88. package/lib/cjs/system/runtime/Strings.js +14 -14
  89. package/lib/cjs/system/runtime/Strings.js.map +1 -1
  90. package/lib/cjs/system/storage/ContentLoader.js +2 -2
  91. package/lib/cjs/system/storage/ContentLoader.js.map +1 -1
  92. package/lib/esm/pointcloud/format/opc/BlockRecord.js +2 -2
  93. package/lib/esm/pointcloud/format/opc/BlockRecord.js.map +1 -1
  94. package/lib/esm/pointcloud/format/opc/ContainerFile.js +2 -2
  95. package/lib/esm/pointcloud/format/opc/ContainerFile.js.map +1 -1
  96. package/lib/esm/pointcloud/format/opc/FileReader.js +2 -2
  97. package/lib/esm/pointcloud/format/opc/FileReader.js.map +1 -1
  98. package/lib/esm/pointcloud/format/opc/GeometryReader.js +6 -6
  99. package/lib/esm/pointcloud/format/opc/GeometryReader.js.map +1 -1
  100. package/lib/esm/pointcloud/format/opc/TileRecord.js +2 -2
  101. package/lib/esm/pointcloud/format/opc/TileRecord.js.map +1 -1
  102. package/lib/esm/pointcloud/model/AttributeTypes.js +16 -16
  103. package/lib/esm/pointcloud/model/AttributeTypes.js.map +1 -1
  104. package/lib/esm/pointcloud/model/AttributeValue.js +4 -4
  105. package/lib/esm/pointcloud/model/AttributeValue.js.map +1 -1
  106. package/lib/esm/pointcloud/model/CloudPoint.js +2 -2
  107. package/lib/esm/pointcloud/model/CloudPoint.js.map +1 -1
  108. package/lib/esm/pointcloud/model/PointDataRaw.js +2 -2
  109. package/lib/esm/pointcloud/model/PointDataRaw.js.map +1 -1
  110. package/lib/esm/pointcloud/model/ReadRequest.js +6 -6
  111. package/lib/esm/pointcloud/model/ReadRequest.js.map +1 -1
  112. package/lib/esm/pointcloud/model/StandardAttributes.js +21 -21
  113. package/lib/esm/pointcloud/model/StandardAttributes.js.map +1 -1
  114. package/lib/esm/pointcloud/render/DataManager.js +6 -6
  115. package/lib/esm/pointcloud/render/DataManager.js.map +1 -1
  116. package/lib/esm/pointcloud/render/TileLoadSorter.js +2 -2
  117. package/lib/esm/pointcloud/render/TileLoadSorter.js.map +1 -1
  118. package/lib/esm/pointcloud/render/ViewTree.js +4 -4
  119. package/lib/esm/pointcloud/render/ViewTree.js.map +1 -1
  120. package/lib/esm/spatial/crs/CRSManager.js +2 -2
  121. package/lib/esm/spatial/crs/CRSManager.js.map +1 -1
  122. package/lib/esm/spatial/ecrs/CRS.js +34 -34
  123. package/lib/esm/spatial/ecrs/CRS.js.map +1 -1
  124. package/lib/esm/spatial/ecrs/CoordinateSystem.js +2 -2
  125. package/lib/esm/spatial/ecrs/CoordinateSystem.js.map +1 -1
  126. package/lib/esm/spatial/ecrs/DataFileUnit.js +1 -1
  127. package/lib/esm/spatial/ecrs/DataFileUnit.js.map +1 -1
  128. package/lib/esm/spatial/ecrs/Datum.js +4 -4
  129. package/lib/esm/spatial/ecrs/Datum.js.map +1 -1
  130. package/lib/esm/spatial/ecrs/OnlineRegistry.js +2 -2
  131. package/lib/esm/spatial/ecrs/OnlineRegistry.js.map +1 -1
  132. package/lib/esm/spatial/ecrs/Operation.js +6 -6
  133. package/lib/esm/spatial/ecrs/Operation.js.map +1 -1
  134. package/lib/esm/spatial/ecrs/Registry.js +17 -17
  135. package/lib/esm/spatial/ecrs/Registry.js.map +1 -1
  136. package/lib/esm/spatial/ecrs/Transform.js +11 -11
  137. package/lib/esm/spatial/ecrs/Transform.js.map +1 -1
  138. package/lib/esm/spatial/ecrs/Unit.js +24 -24
  139. package/lib/esm/spatial/ecrs/Unit.js.map +1 -1
  140. package/lib/esm/spatial/ecrs/WellKnownText.js +8 -8
  141. package/lib/esm/spatial/ecrs/WellKnownText.js.map +1 -1
  142. package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js +2 -2
  143. package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
  144. package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js +2 -2
  145. package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
  146. package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js +2 -2
  147. package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
  148. package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js +2 -2
  149. package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
  150. package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js +6 -6
  151. package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
  152. package/lib/esm/spatial/ecrs/projection/Mercator1SP.js +4 -4
  153. package/lib/esm/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
  154. package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js +4 -4
  155. package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
  156. package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js +4 -4
  157. package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
  158. package/lib/esm/spatial/ecrs/projection/TransverseMercator.js +4 -4
  159. package/lib/esm/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
  160. package/lib/esm/spatial/ecrs/transformation/PositionVector.js +2 -2
  161. package/lib/esm/spatial/ecrs/transformation/PositionVector.js.map +1 -1
  162. package/lib/esm/system/buffer/Float32Buffer.js +2 -2
  163. package/lib/esm/system/buffer/Float32Buffer.js.map +1 -1
  164. package/lib/esm/system/buffer/Uint16Buffer.js +2 -2
  165. package/lib/esm/system/buffer/Uint16Buffer.js.map +1 -1
  166. package/lib/esm/system/buffer/Uint8Buffer.js +2 -2
  167. package/lib/esm/system/buffer/Uint8Buffer.js.map +1 -1
  168. package/lib/esm/system/runtime/ALong.js +26 -26
  169. package/lib/esm/system/runtime/ALong.js.map +1 -1
  170. package/lib/esm/system/runtime/ASystem.js +1 -1
  171. package/lib/esm/system/runtime/ASystem.js.map +1 -1
  172. package/lib/esm/system/runtime/Downloader.js +2 -2
  173. package/lib/esm/system/runtime/Downloader.js.map +1 -1
  174. package/lib/esm/system/runtime/Message.js +2 -2
  175. package/lib/esm/system/runtime/Message.js.map +1 -1
  176. package/lib/esm/system/runtime/Numbers.js +6 -6
  177. package/lib/esm/system/runtime/Numbers.js.map +1 -1
  178. package/lib/esm/system/runtime/Strings.js +14 -14
  179. package/lib/esm/system/runtime/Strings.js.map +1 -1
  180. package/lib/esm/system/storage/ContentLoader.js +2 -2
  181. package/lib/esm/system/storage/ContentLoader.js.map +1 -1
  182. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLoader.js","sourceRoot":"","sources":["../../../../src/system/storage/ContentLoader.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAYH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC;;GAEG;AACH,gBAAgB;AAChB,MAAM,OAAO,aAAa;IAkBtB;;OAEG;IACH,YAAmB,WAAwB,EAAE,QAAgB;QACzD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAED;;OAEG;IACI,KAAK;QACR,IAAI,CAAC,SAAS,GAAG,IAAI,KAAK,EAAa,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAC3B,CAAC;IAED;;OAE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AAW,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YACtD,IAAI,QAAQ,GAAgB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;gBACpE,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC5B,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;;AAhGD,8BAA8B;AACN,oBAAM,GAAW,eAAe,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.storage;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n\nimport { ABuffer } from \"../buffer/ABuffer\";\nimport { AList } from \"../collection/AList\";\nimport { ALong } from \"../runtime/ALong\";\nimport { Message } from \"../runtime/Message\";\nimport { FileContent } from \"./FileContent\";\nimport { FileRange } from \"./FileRange\";\nimport { FileStorage } from \"./FileStorage\";\n\n/**\n * Class ContentLoader helps requesting and loading multiple ranges from a file with a single request to the storage service.\n */\n/** @internal */\nexport class ContentLoader {\n /** The name of this module */\n private static readonly MODULE: string = \"ContentLoader\";\n\n /** The storage space of the file */\n private _fileStorage: FileStorage;\n /** The name of the file */\n private _fileName: string;\n\n /** The list of requests */\n private _requests: AList<FileRange>;\n /** Has loading started? */\n private _loading: boolean;\n /** Has loading stopped? */\n private _loaded: boolean;\n /** The list of responses */\n private _responses: AList<FileContent>;\n\n /**\n * Create a new content loader.\n */\n public constructor(fileStorage: FileStorage, fileName: string) {\n this._fileStorage = fileStorage;\n this._fileName = fileName;\n this.clear();\n }\n\n /**\n * Clear the content loader for reuse.\n */\n public clear(): void {\n this._requests = new AList<FileRange>();\n this._loading = false;\n this._loaded = false;\n this._responses = null;\n }\n\n /**\n * Add a request to load a content range.\n */\n public requestFilePart(offset: ALong, size: int32): ContentLoader {\n this._requests.add(new FileRange(offset, size));\n return this;\n }\n\n /**\n * Get the total size of the data to be loaded.\n */\n public getTotalRequestSize(): int32 {\n let totalSize: int32 = 0;\n for (let i: number = 0; i < this._requests.size(); i++) totalSize += this._requests.get(i).size;\n return totalSize;\n }\n\n /**\n * Print info.\n */\n public printInfo(): void {\n Message.print(ContentLoader.MODULE, \"Requesting \" + this._requests.size() + \" parts from '\" + this._fileName + \"' with total size \" + this.getTotalRequestSize());\n }\n\n /**\n * Has all content been loaded?\n */\n public isLoaded(): boolean {\n return this._loaded;\n }\n\n /**\n * Has all content been loaded?\n */\n public isAvailable(): boolean {\n return this.isLoaded();\n }\n\n /**\n * Load all content from storage.\n */\n public async load(): Promise<ContentLoader> {\n this._loading = true;\n this.printInfo();\n this._responses = await this._fileStorage.readFileParts(this._fileName, this._requests);\n this._loaded = true;\n return this;\n }\n\n /**\n * Get a content range that has been loaded.\n */\n public getFilePart(offset: ALong, size: int32): ABuffer {\n for (let i: number = 0; i < this._responses.size(); i++) {\n let response: FileContent = this._responses.get(i);\n if (response.offset.same(offset) && (response.content.size() == size)) {\n return response.content;\n }\n }\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"ContentLoader.js","sourceRoot":"","sources":["../../../../src/system/storage/ContentLoader.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAYH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC;;GAEG;AACH,gBAAgB;AA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CAAC;IAED;;OAEG;IACI,WAAW;QACd,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI;QACb,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACxF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,WAAW,CAAC,MAAa,EAAE,IAAW;QACzC,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YACtD,IAAI,QAAQ,GAAgB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;gBACpE,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC5B,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.system.storage;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\n\nimport { ABuffer } from \"../buffer/ABuffer\";\nimport { AList } from \"../collection/AList\";\nimport { ALong } from \"../runtime/ALong\";\nimport { Message } from \"../runtime/Message\";\nimport { FileContent } from \"./FileContent\";\nimport { FileRange } from \"./FileRange\";\nimport { FileStorage } from \"./FileStorage\";\n\n/**\n * Class ContentLoader helps requesting and loading multiple ranges from a file with a single request to the storage service.\n */\n/** @internal */\nexport class ContentLoader {\n /** The name of this module */\n private static readonly MODULE: string = \"ContentLoader\";\n\n /** The storage space of the file */\n private _fileStorage: FileStorage;\n /** The name of the file */\n private _fileName: string;\n\n /** The list of requests */\n private _requests: AList<FileRange>;\n /** Has loading started? */\n private _loading: boolean;\n /** Has loading stopped? */\n private _loaded: boolean;\n /** The list of responses */\n private _responses: AList<FileContent>;\n\n /**\n * Create a new content loader.\n */\n public constructor(fileStorage: FileStorage, fileName: string) {\n this._fileStorage = fileStorage;\n this._fileName = fileName;\n this.clear();\n }\n\n /**\n * Clear the content loader for reuse.\n */\n public clear(): void {\n this._requests = new AList<FileRange>();\n this._loading = false;\n this._loaded = false;\n this._responses = null;\n }\n\n /**\n * Add a request to load a content range.\n */\n public requestFilePart(offset: ALong, size: int32): ContentLoader {\n this._requests.add(new FileRange(offset, size));\n return this;\n }\n\n /**\n * Get the total size of the data to be loaded.\n */\n public getTotalRequestSize(): int32 {\n let totalSize: int32 = 0;\n for (let i: number = 0; i < this._requests.size(); i++) totalSize += this._requests.get(i).size;\n return totalSize;\n }\n\n /**\n * Print info.\n */\n public printInfo(): void {\n Message.print(ContentLoader.MODULE, \"Requesting \" + this._requests.size() + \" parts from '\" + this._fileName + \"' with total size \" + this.getTotalRequestSize());\n }\n\n /**\n * Has all content been loaded?\n */\n public isLoaded(): boolean {\n return this._loaded;\n }\n\n /**\n * Has all content been loaded?\n */\n public isAvailable(): boolean {\n return this.isLoaded();\n }\n\n /**\n * Load all content from storage.\n */\n public async load(): Promise<ContentLoader> {\n this._loading = true;\n this.printInfo();\n this._responses = await this._fileStorage.readFileParts(this._fileName, this._requests);\n this._loaded = true;\n return this;\n }\n\n /**\n * Get a content range that has been loaded.\n */\n public getFilePart(offset: ALong, size: int32): ABuffer {\n for (let i: number = 0; i < this._responses.size(); i++) {\n let response: FileContent = this._responses.get(i);\n if (response.offset.same(offset) && (response.content.size() == size)) {\n return response.content;\n }\n }\n return null;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-orbitgt",
3
- "version": "5.0.0-dev.4",
3
+ "version": "5.0.0-dev.40",
4
4
  "description": "",
5
5
  "main": "lib/cjs/core-orbitgt.js",
6
6
  "module": "lib/esm/core-orbitgt.js",
@@ -22,7 +22,7 @@
22
22
  "@itwin/eslint-plugin": "5.0.0-dev.1",
23
23
  "@types/chai": "4.3.1",
24
24
  "@types/mocha": "^10.0.6",
25
- "@types/node": "~18.16.20",
25
+ "@types/node": "~20.9.5",
26
26
  "chai": "^4.3.10",
27
27
  "cpx2": "^3.0.0",
28
28
  "debug": "^2.6.9",
@@ -31,8 +31,8 @@
31
31
  "nyc": "^15.1.0",
32
32
  "rimraf": "^3.0.2",
33
33
  "typescript": "~5.6.2",
34
- "@itwin/core-bentley": "5.0.0-dev.4",
35
- "@itwin/build-tools": "5.0.0-dev.4"
34
+ "@itwin/build-tools": "5.0.0-dev.40",
35
+ "@itwin/core-bentley": "5.0.0-dev.40"
36
36
  },
37
37
  "nyc": {
38
38
  "extends": "./node_modules/@itwin/build-tools/.nycrc"
@@ -40,10 +40,10 @@
40
40
  "scripts": {
41
41
  "build": "npm run -s build:cjs && npm run -s build:esm",
42
42
  "build:cjs": "tsc 1>&2 --outDir lib/cjs && npm run -s copy:test-assets",
43
- "build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm",
43
+ "build:esm": "tsc 1>&2 --module ES2022 --outDir lib/esm",
44
44
  "clean": "rimraf lib .rush/temp/package-deps*.json",
45
45
  "copy:test-assets": "cpx \"./src/test/assets/**/*\" ./lib/cjs/test/assets",
46
- "docs": "betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-orbitgt/file.json --tsIndexFile=./core-orbitgt.ts --onlyJson",
46
+ "docs": "betools docs --json=../../generated-docs/core/core-orbitgt/file.json --tsIndexFile=./core-orbitgt.ts --onlyJson",
47
47
  "extract-api": "betools extract-api --entry=core-orbitgt",
48
48
  "lint": "",
49
49
  "test": "mocha",