-
Notifications
You must be signed in to change notification settings - Fork 0
/
fill_up_form.go
78 lines (68 loc) · 3.9 KB
/
fill_up_form.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// generated code - do not edit
package probe
import (
form "github.com/fullstack-lang/gongtable/go/models"
"github.com/fullstack-lang/gongsim/go/models"
"github.com/fullstack-lang/gongsim/go/orm"
)
var __dummy_orm_fillup_form = orm.BackRepoStruct{}
func FillUpForm[T models.Gongstruct](
instance *T,
formGroup *form.FormGroup,
probe *Probe,
) {
switch instanceWithInferedType := any(instance).(type) {
// insertion point
case *models.DummyAgent:
// insertion point
BasicFieldtoForm("TechName", instanceWithInferedType.TechName, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
BasicFieldtoForm("Name", instanceWithInferedType.Name, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
case *models.Engine:
// insertion point
BasicFieldtoForm("Name", instanceWithInferedType.Name, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
BasicFieldtoForm("EndTime", instanceWithInferedType.EndTime, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
BasicFieldtoForm("CurrentTime", instanceWithInferedType.CurrentTime, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
BasicFieldtoForm("SecondsSinceStart", instanceWithInferedType.SecondsSinceStart, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
BasicFieldtoForm("Fired", instanceWithInferedType.Fired, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
EnumTypeStringToForm("ControlMode", instanceWithInferedType.ControlMode, instanceWithInferedType, probe.formStage, formGroup)
EnumTypeStringToForm("State", instanceWithInferedType.State, instanceWithInferedType, probe.formStage, formGroup)
BasicFieldtoForm("Speed", instanceWithInferedType.Speed, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
case *models.Event:
// insertion point
BasicFieldtoForm("Name", instanceWithInferedType.Name, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
BasicFieldtoForm("Duration", instanceWithInferedType.Duration, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
case *models.GongsimCommand:
// insertion point
BasicFieldtoForm("Name", instanceWithInferedType.Name, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
EnumTypeStringToForm("Command", instanceWithInferedType.Command, instanceWithInferedType, probe.formStage, formGroup)
BasicFieldtoForm("CommandDate", instanceWithInferedType.CommandDate, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
EnumTypeStringToForm("SpeedCommandType", instanceWithInferedType.SpeedCommandType, instanceWithInferedType, probe.formStage, formGroup)
BasicFieldtoForm("DateSpeedCommand", instanceWithInferedType.DateSpeedCommand, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
AssociationFieldToForm("Engine", instanceWithInferedType.Engine, formGroup, probe)
case *models.GongsimStatus:
// insertion point
BasicFieldtoForm("Name", instanceWithInferedType.Name, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
EnumTypeStringToForm("CurrentCommand", instanceWithInferedType.CurrentCommand, instanceWithInferedType, probe.formStage, formGroup)
BasicFieldtoForm("CompletionDate", instanceWithInferedType.CompletionDate, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
EnumTypeStringToForm("CurrentSpeedCommand", instanceWithInferedType.CurrentSpeedCommand, instanceWithInferedType, probe.formStage, formGroup)
BasicFieldtoForm("SpeedCommandCompletionDate", instanceWithInferedType.SpeedCommandCompletionDate, instanceWithInferedType, probe.formStage, formGroup,
false, false, 0, false, 0)
default:
_ = instanceWithInferedType
}
}