1 /*
2  * sys-emu - A system emulator for tutorials
3  * Copyright (C) 2018  Uwe Plonus
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17  */
18 
19 package info.osdevelopment.sysemu.model
20 
21 import info.osdevelopment.sysemu.processor.ProcessorDescriptor
22 import io.swagger.v3.oas.annotations.media.Schema
23 
24 object ProcessorModel {
25 
26   def apply(processorDescriptor: ProcessorDescriptor) =
27     new ProcessorModel(processorDescriptor.name, processorDescriptor.maxMemory)
28 
29 }
30 
31 @Schema(
32   name = "Processor"
33 )
34 class ProcessorModel(@Schema(example = "8086") val name: String,
35                      @Schema(example = "1048576") val maxMemory: Long) {
36 
37 }
Line Stmt Id Pos Tree Symbol Code
27 253 977 - 1052 Apply info.osdevelopment.sysemu.model.ProcessorModel.<init> new ProcessorModel(processorDescriptor.name, processorDescriptor.maxMemory)
27 252 1022 - 1051 Select info.osdevelopment.sysemu.processor.ProcessorDescriptor.maxMemory processorDescriptor.maxMemory
27 251 996 - 1020 Select info.osdevelopment.sysemu.processor.ProcessorDescriptor.name processorDescriptor.name