feat:处理器初步实现---有接上了新优化,回显需要再看下
This commit is contained in:
31
samples/handleAbility/common/Filer.ts
Normal file
31
samples/handleAbility/common/Filer.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* CAD文件数据
|
||||
*/
|
||||
export class NestFiler
|
||||
{
|
||||
private readIndex: number = 0
|
||||
constructor(public _datas: any[] = []) { }
|
||||
|
||||
Clear()
|
||||
{
|
||||
this._datas.length = 0
|
||||
return this.Reset()
|
||||
}
|
||||
|
||||
Reset()
|
||||
{
|
||||
this.readIndex = 0
|
||||
return this
|
||||
}
|
||||
|
||||
Write(data: any)
|
||||
{
|
||||
this._datas.push(data)
|
||||
return this
|
||||
}
|
||||
|
||||
Read(): any
|
||||
{
|
||||
return this._datas[this.readIndex++]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user