annotate src/impl/PipeRead.cbc @ 105:f1be2d5abc8a

fix camel2snake
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 21 Nov 2019 14:45:01 +0900
parents 9bfc4fbb5502
children 547c20b052dc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
104
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include "../context.h";
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #interface "SysRead.h";
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 // ----
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // typedef struct PipeRead<Type, Isa> impl SysRead {
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 // struct CbCPipe *pipe;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 // struct String *addr;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 // struct Integer* i;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 // } PipeRead;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 // ----
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 SysRead* createPipeRead(struct Context* cbc_context) {
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 struct SysRead* sys_read = new SysRead();
105
f1be2d5abc8a fix camel2snake
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 104
diff changeset
14 struct PipeRead* pipe_read = new PipeRead();
f1be2d5abc8a fix camel2snake
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 104
diff changeset
15 sys_read->sys_read = (union Data*)pipe_read;
f1be2d5abc8a fix camel2snake
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 104
diff changeset
16 pipe_read->num = NULL;
104
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 sys_read->read = C_readPipeRead;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 sys_read->ret = C_retPipeRead;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 sys_read->next = C_nextPipeRead;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 return sys_read;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 }
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 __code readPipeRead(__code next(...)) {
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 goto next(...);
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 }
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 __code retPipeRead(PipeRead* cbc_sys_file, UInteger* num) {
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 }
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 __code nextPipeRead(...) {
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 }
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34