main.anubis
4.88 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/**************************************************
* Project* The 伝作 (Densaku) project
*
* *Title* Generating type and Muscle message with Anubis
*
* *Copyright* Copyright © David RENÉ 2017.
*
*
* *Overview*
*
*
*/
/*
*
* Created by PyramIDE.
* User: フランスのトトロ aka (David RENÉ)
* Date: 15/01/2017
* Time: 23:30
* © Calexium
*/
read densaku_lib/types/densaku.anubis
read generation/files.anubis
read calexium_lib/CXM_message_constants.anubis
public define List(DS_Message) the_messages_list =
[
ds_message("Get_Domain_Name", "_CXM_DOMAIN_GET_NAME", [
field("SERIAL", string, comment("MF Serial number")),
field("CXM_Key", string, comment("Calexium Key provided during the order process")),
])
].
public define List(DS_Type_File) the_types_list =
[
ds_type_file( auto, auto,
[
ds_type("User_Account", [
alternative("account", [
component(string, "first_name"),
component(string, "last_name"),
component(int, "extension")
]),
alternative("account_ext", [
component(string, "first_name"),
component(string, "last_name"),
component(list, int, "extension_list")
]),
alternative("account_super_extended", [
component(string, "first_name"),
component(string, "last_name"),
component(list, int, "extension_list"),
component(extern_type("DB_id", "calexium_lib/model/db_types.anubis"), "db_id")
])
]),
ds_type("Trunk_SIP", [
alternative("account", [
component(string, "login"),
component(string, "password"),
component(string, "host")
])
]),
ds_type("HK_App", [
alternative("hk_app", [
component(string, "app_name", comment("Name of the application")),
component(ds_type("HK_Icon"), "icon", comment("Icon description")),
component(ds_type("HK_Help_Text"), "help"),
component(list, ds_type("HK_Table"),"hk_tables")
])
]),
ds_type("HK_Database", [
alternative("hk_database", [
component(string, "name", comment("name of the database")),
component(list, ds_type("HK_App"), "apps", comment("list of applications"))
])
]),
ds_type("HK_Help_Text", [
enum("no_help_text", comment("no help text available")),
alternative("help_text_TAG", [component(string, "tag_name", comment("TAG use with Anubis translation tool /locale/L3.anubis"))]),
alternative("help_text", [component(string, "help_text", comment("pure text to show"))])
]),
ds_type("HK_Icon", [
enum("no_icon"),
alternative("icon16", [component(string, "name")])
]),
ds_type("HK_Form", no_message, [
alternative("hk_form_in_list", [
component(string, "table_name", comment("database table name which belonging this form")),
component(string, "view_name", comment("name of the view")),
component(list, extern_type("HK_Form_Entry", "hk_form_entry.anubis"), "list"),
component(list, extern_type("HK_Form_Tab", "hk_form_tab.anubis"), "tabs")
]),
alternative("hk_form_in_table", [
component(string, "table_name", comment("database table name which belonging this form")),
component(string, "view_name", comment("name of the view")),
component(extern_type("HK_Form_Table", "hk_form_table.anubis"), "form_in_table")
])
])
]),
ds_type_file( relative_path("hayamiki_lib/view/types/"), name("HK_Editor_Table"),
[
ds_type("HK_Editor_Table_Cell", [
enum("empty"),
alternative("column", [
component(string, "column_name")
]),
alternative("label", [
component(string, "label"),
]),
alternative("table", [
component(list, ds_type("HK_Editor_Table_Line"), "lines")
])
]),
ds_type("HK_Editor_Table_Line", [
alternative("line", [
component(list, ds_type("HK_Editor_Table_Cell"), "cells")
])
]),
ds_type("HK_Editor_Table", [
alternative("table", [
component(list, ds_type("HK_Editor_Table_Line"), "lines")
])
]),
])
]
.
global define One
takaden
(
List(String) args
) =
if load_tk_generator is
{
failure then println("Takaden generator can't be load"),
success(hk_gen) then forget(tk_gen.generate_type_msg_files(the_type_msg_description, ""))
}.
global define One
densaku
(
List(String) args
)=
//print(dump_TK_Type_list(the_types_list)).
forget(generate_message_files(the_types_list, the_messages_list, "")).