/* * Verrückte Turing-Maschinen — A turing complete game * Copyright (C) 2016-2018 kcf * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ namespace mod_vtm { export namespace mod_model { export namespace mod_actuator { /** * @author kcf */ export type type_actuator = lib_call.type_complex; /** * @author kcf */ export type signature_actuator = { example : ()=>type_actuator; rotate : (actuator : type_actuator, increment : int)=>void; use : (actuator : type_actuator, token : mod_token.type_token)=>void; export : (actuator : type_actuator)=>any; import : (raw : any)=>type_actuator; } ; /** * @author kcf */ export var trait_actuator : lib_trait.type_trait = lib_trait.create(); /** * @author kcf */ /* export function create(kind : string, kern : any) : type_actuator { return lib_call.wrap(kind, kern); } */ /** * @author kcf */ export function example(kind : string) : type_actuator { return lib_trait.deploy(trait_actuator, kind)["example"](); } /** * @author kcf */ export function rotate(actuator : type_actuator, increment ?: int) : void { return lib_trait.deploy(trait_actuator, actuator.kind)["rotate"](actuator, increment); } /** * @author kcf */ export function use(actuator : type_actuator, token : mod_token.type_token) : void { return lib_trait.deploy(trait_actuator, actuator.kind)["use"](actuator, token); } /** * @author kcf */ export function export_(actuator : type_actuator) : any { return lib_trait.deploy(trait_actuator, actuator.kind)["export"](actuator); } /** * @author kcf */ export function import_(raw : any) : type_actuator { return lib_trait.deploy(trait_actuator, raw.kind)["import"](raw); } } } }