Files
Михаил Капелько 752b34b95d d
2024-01-06 17:55:56 +03:00

70 linhas
1.1 KiB
Plaintext

Este arquivo contém caracteres Unicode ambíguos

Este arquivo contém caracteres Unicode que podem ser confundidos com outros caracteres. Se você acha que isso é intencional, pode ignorar esse aviso com segurança. Use o botão Escapar para revelá-los

// ВНИМАНИЕ Сгенерировано автоматом из файла %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 any = [Any]()
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%
}
}