@zhongguo168a/yxeditor-common 0.0.183 → 0.0.185

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.
package/dist/index.d.ts CHANGED
@@ -933,6 +933,75 @@ declare class DictSource extends EventDispatcher {
933
933
  protected _data: Dictionary<string, DictNode>;
934
934
  }
935
935
 
936
+ type CreatorFunction = (...args: any[]) => {};
937
+ /**
938
+ * 回收的方法
939
+ * 使用回收方法的原因是,某些对象没有recycle函数,由不方便实现recycle函数
940
+ */
941
+ type RecycleFunction = (item: any, ...args: any[]) => void;
942
+ /**
943
+ * 释放的方法
944
+ */
945
+ type DisposeFunction = (item: any, ...args: any[]) => void;
946
+ /**
947
+ * 对象池
948
+ */
949
+ declare class Pool {
950
+ creatorFunction: CreatorFunction;
951
+ recycleFunction: RecycleFunction;
952
+ disposeFunction: DisposeFunction;
953
+ name: string;
954
+ list: any[];
955
+ constructor(config: {
956
+ creatorFunction: CreatorFunction;
957
+ recycleFunction?: RecycleFunction;
958
+ disposeFunction?: DisposeFunction;
959
+ name?: string;
960
+ });
961
+ /**
962
+ * 获取一个对象
963
+ */
964
+ getObject(...args: any[]): any;
965
+ /**
966
+ * 回收一个对象
967
+ * @param obj
968
+ */
969
+ recycleObject(obj: any): void;
970
+ /**
971
+ * 释放一个对象
972
+ * @param obj
973
+ */
974
+ disposeObject(obj: any): void;
975
+ /**
976
+ * 释放对象池
977
+ */
978
+ dispose(): void;
979
+ }
980
+ /**
981
+ * 对象池
982
+ */
983
+ declare class SamplePool {
984
+ list: any[];
985
+ constructor();
986
+ /**
987
+ * 获取一个对象
988
+ */
989
+ get(): any;
990
+ /**
991
+ * 回收一个对象
992
+ * @param obj
993
+ */
994
+ put(obj: any): void;
995
+ }
996
+ /**
997
+ * 对象池
998
+ */
999
+ declare class SamplePoolSet {
1000
+ get(name: string): any;
1001
+ put(name: string, item: any): void;
1002
+ protected pools: {};
1003
+ }
1004
+
936
1005
  declare class TailIterator {
937
1006
  break(reason?: any): void;
938
1007
  isBreak(): boolean;
@@ -941,6 +1010,7 @@ declare class TailIterator {
941
1010
  protected _reason: any;
942
1011
  protected _isBreak: any;
943
1012
  }
1013
+ declare const iteratorPool: Pool;
944
1014
 
945
1015
  interface IController {
946
1016
  get name(): string;
@@ -1767,75 +1837,6 @@ declare class LogManager {
1767
1837
  }
1768
1838
  declare const logmgr: LogManager;
1769
1839
 
1770
- type CreatorFunction = (...args: any[]) => {};
1771
- /**
1772
- * 回收的方法
1773
- * 使用回收方法的原因是,某些对象没有recycle函数,由不方便实现recycle函数
1774
- */
1775
- type RecycleFunction = (item: any, ...args: any[]) => void;
1776
- /**
1777
- * 释放的方法
1778
- */
1779
- type DisposeFunction = (item: any, ...args: any[]) => void;
1780
- /**
1781
- * 对象池
1782
- */
1783
- declare class Pool {
1784
- creatorFunction: CreatorFunction;
1785
- recycleFunction: RecycleFunction;
1786
- disposeFunction: DisposeFunction;
1787
- name: string;
1788
- list: any[];
1789
- constructor(config: {
1790
- creatorFunction: CreatorFunction;
1791
- recycleFunction?: RecycleFunction;
1792
- disposeFunction?: DisposeFunction;
1793
- name?: string;
1794
- });
1795
- /**
1796
- * 获取一个对象
1797
- */
1798
- getObject(...args: any[]): any;
1799
- /**
1800
- * 回收一个对象
1801
- * @param obj
1802
- */
1803
- recycleObject(obj: any): void;
1804
- /**
1805
- * 释放一个对象
1806
- * @param obj
1807
- */
1808
- disposeObject(obj: any): void;
1809
- /**
1810
- * 释放对象池
1811
- */
1812
- dispose(): void;
1813
- }
1814
- /**
1815
- * 对象池
1816
- */
1817
- declare class SamplePool {
1818
- list: any[];
1819
- constructor();
1820
- /**
1821
- * 获取一个对象
1822
- */
1823
- get(): any;
1824
- /**
1825
- * 回收一个对象
1826
- * @param obj
1827
- */
1828
- put(obj: any): void;
1829
- }
1830
- /**
1831
- * 对象池
1832
- */
1833
- declare class SamplePoolSet {
1834
- get(name: string): any;
1835
- put(name: string, item: any): void;
1836
- protected pools: {};
1837
- }
1838
-
1839
1840
  declare class ArrayUtil {
1840
1841
  lastItem(array: any[]): any;
1841
1842
  unique(array: any[]): any[];
@@ -2257,5 +2258,5 @@ declare class WidgetUtil {
2257
2258
  }
2258
2259
  declare var widgetutil: WidgetUtil;
2259
2260
 
2260
- export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, DirectionMode, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryDirection, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapObject, MapUtil, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, RouteViewDict, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TailIterator, TimeUtil, Timer, TreeIterator, TreeNode, TreeRoot, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewModel, ViewModelComponent, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, create等距图集, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, routeViews, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, widgetutil };
2261
+ export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, DirectionMode, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryDirection, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapObject, MapUtil, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, RouteViewDict, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TailIterator, TimeUtil, Timer, TreeIterator, TreeNode, TreeRoot, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewModel, ViewModelComponent, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, create等距图集, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, iteratorPool, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, routeViews, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, widgetutil };
2261
2262
  export type { CreatorFunction, DisposeFunction, IController, IError, IEventDispatcher, IExtend, IListItem, IModel, IModule, ITreeListItem, RecycleFunction };
package/dist/index.esm.js CHANGED
@@ -3626,6 +3626,16 @@ class TailIterator {
3626
3626
  this._reason = "";
3627
3627
  }
3628
3628
  }
3629
+ const iteratorPool = new Pool({
3630
+ creatorFunction: () => {
3631
+ return new TailIterator();
3632
+ },
3633
+ recycleFunction: (item) => {
3634
+ item.reset();
3635
+ },
3636
+ disposeFunction: (item) => {
3637
+ },
3638
+ });
3629
3639
 
3630
3640
  class Controller {
3631
3641
  constructor(name) {
@@ -7157,5 +7167,5 @@ class WidgetUtil {
7157
7167
  }
7158
7168
  var widgetutil = new WidgetUtil();
7159
7169
 
7160
- export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, DirectionMode, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryDirection, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapObject, MapUtil, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, RouteViewDict, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TailIterator, TimeUtil, Timer, TreeIterator, TreeNode, TreeRoot, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewModel, ViewModelComponent, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, create等距图集, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, routeViews, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, widgetutil };
7170
+ export { ArrayUtil, AssetLoader, AssetURI, BitUtil, CallbackList, CameraUtil, CanvasUtil, Controller, ControllerDict, ControllerRepo, ConvertUtil, DictIterator, DictNode, DictSource, Dictionary, DirectionMode, Dispatcher, DocUtil, ErrorUtil, EventDispatcher, EventItem, EventUtil, Factory, FloatUtil, GeometryDirection, GeometryUtil, IdentUtil, LOGGER_EVENT, LinkError, List, ListIterator, ListNode, ListSource, Listener, LogLevel, LogManager, Logger, MapObject, MapUtil, MathUtil, Model, NetUtil, PathUtil, Pool, RandUtil, Route, RouteController, RouteList, RouteView, RouteViewDict, SampleCallbackList, SamplePool, SamplePoolSet, ScaleUtil, SimpleModel, StringUtil, TailIterator, TimeUtil, Timer, TreeIterator, TreeNode, TreeRoot, TreeUtil, UIManager, UIObjectRepo, UIPoolConfig, UISingleConfig, UIUtil, ViewDict, ViewEvent, ViewHistory, ViewList, ViewModel, ViewModelComponent, ViewState, WidgetAlign, WidgetUtil, XAssetManager, XEvent, arrayutil, assetx, bitutil, camerautil, canvasutil, convertutil, create等距图集, ctrlrepo, docutil, errorutil, eventmgr, eventutil, floatutil, formatutil, geoutil, identutil, iteratorPool, loadAtlas, logmgr, maputil, mathutil, netutil, parseAtlas, parsePlist, pathutil, randutil, resutil, routeViews, scaleutil, stringutil, timer, timeutil, treeutil, uimgr, uirepo, uiutil, viewhistorys, widgetutil };
7161
7171
  //# sourceMappingURL=index.esm.js.map