forked from xiangechen/chili3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the IApplication interface and refactor the Application
- Loading branch information
1 parent
6b320bb
commit e61774f
Showing
78 changed files
with
313 additions
and
559 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license. | ||
|
||
import { IShapeFactory } from "chili-geo"; | ||
import { IVisualFactory } from "chili-vis"; | ||
import { IStorage, Serialized } from "./base"; | ||
import { IDocument } from "./document"; | ||
import { IService } from "./service"; | ||
|
||
export interface IApplication { | ||
readonly visualFactory: IVisualFactory; | ||
readonly shapeFactory: IShapeFactory; | ||
readonly services: IService[]; | ||
readonly storage: IStorage; | ||
activeDocument: IDocument | undefined; | ||
newDocument(name: string): Promise<IDocument>; | ||
openDocument(id: string): Promise<IDocument | undefined>; | ||
loadDocument(data: Serialized): Promise<IDocument>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license. | ||
|
||
import { Application } from "chili/src/application"; | ||
import { IApplication } from "../application"; | ||
|
||
export interface ICommand { | ||
execute(application: Application): Promise<void>; | ||
execute(application: IApplication): Promise<void>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license. | ||
|
||
import { Application } from "chili/src/application"; | ||
import { IApplication } from "./application"; | ||
|
||
export interface IService { | ||
register(app: Application): void; | ||
register(app: IApplication): void; | ||
start(): void; | ||
stop(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.