app.anubis
1.84 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
/*
* Created by PyramIDE.
* User: フランスのトトロ aka (David RENÉ)
* Date: 13/02/2016
* Time: 10:06
* © Calexium
*/
transmit help.anubis
transmit tables.anubis
transmit icons.anubis
read tools/basis.anubis
transmit system/muscle.anubis
transmit calexium_lib/web/CXM_json.anubis
transmit hayamiki_lib/model/types/hk_app.anubis
/* Default constructor for HK_App*/
public define HK_App
hk_app
(
String app_name,
HK_Help_Text help,
List(HK_Table) hk_tables
)=
hk_app(app_name, no_icon, help, hk_tables).
public define HK_App
hk_app
(
String app_name,
HK_Icon icon,
List(HK_Table) hk_tables
)=
hk_app(app_name, icon, no_help_text, hk_tables).
public define HK_App
hk_app
(
String app_name,
List(HK_Table) hk_tables
)=
hk_app(app_name, no_icon, no_help_text, hk_tables).
type HK_App:
hk_app(
String app_name,
HK_Icon icon,
HK_Help_Text help,
List(HK_Table) hk_tables
).
_HK_APP:
========
+----------+---------------+--------------------------
| name | type | description
+----------+---------------+--------------------------------
| "name" | String | Name of the application
| "icon" | Message | Icon description, contained in message id _HK_ICON
| "help" | Message | Help string, contained in message id _HK_HELP_TEXT
| "tables" | List(Message) | List of tables of that application contained in message id _HK_TABLE
public define JsonValue
to_JSON
(
HK_App app
)=
json_object("_HK_APP",
[
json_member("name", json_string(app.app_name)),
json_member("icon", to_JSON(app.icon)),
json_member("help", to_JSON(app.help)),
json_member("tables", json_array(map((HK_Table table) |-> to_JSON(table), app.hk_tables)))
]).