annotate src/impl/PipeRead.cbc @ 139:0f8ae55cacbe

tweak
author anatofuz
date Thu, 12 Dec 2019 14:27:05 +0900
parents 547c20b052dc
children eef045e9772a
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->next = C_nextPipeRead;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 return sys_read;
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 }
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 __code readPipeRead(__code next(...)) {
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 goto next(...);
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 }
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 __code nextPipeRead(...) {
9bfc4fbb5502 create PipeRead.cbc
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
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