Files
check-ios-bus/Utilities/_platform/2/templates/file
Михаил Капелько 49cee91239 d
2024-01-29 18:09:14 +03:00

69 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ВНИМАНИЕ Сгенерировано автоматом из файла %MODULE%.yml
// ВНИМАНИЕ Не менять руками!
%IMPORTS%
// MARK: - Context
public protocol %MODULE%Context {
%CONTEXT_FIELDS%
}
// MARK: - Controller
extension %MODULE% {
final class Controller: MPAK.Controller<%MODULE%.Model> {
init() {
super.init(
%MODULE%.Model(),
debugClassName: "%MODULE_SHORT%Ctrl",
debugLog: { aelog($0) }
)
}
}
%CORE%
// MARK: - Model
public struct Model: %MODULE%Context {
%MODEL_FIELDS%
}
// MARK: - Service
public final class Service {
let ctrl = Controller()
let world: World
%SERVICE_CORE%
var subscriptions = [AnyCancellable]()
static private(set) weak var singleton: Service?
public init(_ world: World) {
self.world = world
Self.singleton = self
%SERVICE_SECTIONS%
}
}
// MARK: - World
public struct World {
%WORLD_FIELDS%
public init(
%WORLD_PARAMETERS%
) {
%WORLD_CONSTRUCTOR%
}
}
enum SectionGenerated {
%CORE_SECTION_GENERATED%
%SERVICE_SECTION_GENERATED%
}
}