message_header.anubis
1.11 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
/*
* Created by PyramIDE.
* User: フランスのトトロ aka (David RENÉ)
* Date: 23/01/2017
* Time: 22:37
* © Calexium
*/
read tools/basis.anubis
read tools/streams.anubis
read tools/ISO-8601.anubis
read system/string.anubis
read densaku_lib/types/ds_types.anubis
read densaku_lib/types/ds_message.anubis
public define String
insert_read_foreign_type
(
DS_Message ds_message //type description
)=
with foreign_type_list = get_all_extern_type(ds_message),
join("", map((Extern_type ext_type) |-> since ext_type is extern(_, read_file), "read "+read_file+"\n", foreign_type_list))
.
public define Maybe(One)
generate_message_header
(
Stream stream,
DS_Message ds_message //type description
)=
write_string(stream,
"/*
* Created by 伝作 (Densaku)
* Types & Messages generator written by フランスのトトロ aka (David RENÉ)
* Date: "+_Int_to_ISO_8601_date(now)+"
* Time: "+_Int_to_ISO_8601_time(now)+"
*
*/
transmit system/muscle.anubis
transmit system/convert.anubis
transmit tools/basis.anubis
" +
insert_read_foreign_type(ds_message)+
"\n"
)
.