Changes in / [9dd31e7:7522692]
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/collection.hfa
r9dd31e7 r7522692 35 35 // return (T *)Next( (Colable *)n ); 36 36 // } 37 38 // bool listed( T * n ) {39 // return Next( (Colable *)n ) != 0p;40 // }41 37 // } // distribution 42 38 } // distribution 43 39 40 forall( dtype T | { T *& Next ( T * ); } ) { 41 bool listed( T * n ) { 42 return Next( n ) != 0p; 43 } 44 } 44 45 45 46 struct Collection { -
libcfa/src/bits/queue.hfa
r9dd31e7 r7522692 3 3 #include "bits/collection.hfa" 4 4 5 forall( dtype T | { T *& Next ( T * ); bool listed ( T * );} ) {5 forall( dtype T | { T *& Next ( T * ); } ) { 6 6 struct Queue { 7 7 inline Collection; // Plan 9 inheritance … … 142 142 } // distribution 143 143 144 forall( dtype T | { T *& Next ( T * ); bool listed ( T * );} ) {144 forall( dtype T | { T *& Next ( T * ); } ) { 145 145 struct QueueIter { 146 146 inline ColIter; // Plan 9 inheritance -
libcfa/src/bits/sequence.hfa
r9dd31e7 r7522692 36 36 } // distribution 37 37 38 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); bool listed ( T * );} ) {38 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) { 39 39 struct Sequence { 40 40 inline Collection; // Plan 9 inheritance … … 216 216 } // distribution 217 217 218 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); bool listed ( T * );} ) {218 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) { 219 219 // SeqIter(T) is used to iterate over a Sequence(T) in head-to-tail order. 220 220 struct SeqIter { -
libcfa/src/bits/stack.hfa
r9dd31e7 r7522692 3 3 #include "bits/collection.hfa" 4 4 5 forall( dtype T | { T *& Next ( T * ); bool listed ( T * );} ) {5 forall( dtype T | { T *& Next ( T * ); } ) { 6 6 struct Stack { 7 7 inline Collection; // Plan 9 inheritance … … 58 58 59 59 60 forall( dtype T | { T *& Next ( T * ); bool listed ( T * );} ) {60 forall( dtype T | { T *& Next ( T * ); } ) { 61 61 struct StackIter { 62 62 inline ColIter; // Plan 9 inheritance -
tests/multi_list.cfa
r9dd31e7 r7522692 27 27 } 28 28 29 bool listed( TaskDL * n ) {30 return Next( (Colable *)n ) != 0p;31 }32 33 29 struct TaskSL { 34 30 inline Colable; … … 45 41 TaskSL *& Next( TaskSL * n ) { 46 42 return (TaskSL *)Next( (Colable *)n ); 47 }48 49 bool listed( TaskSL * n ) {50 return Next( (Colable *)n ) != 0p;51 43 } 52 44 -
tests/queue.cfa
r9dd31e7 r7522692 16 16 Fred *& Next( Fred * n ) { 17 17 return (Fred *)Next( (Colable *)n ); 18 }19 20 bool listed( Fred * n ) {21 return Next( (Colable *)n ) != 0p;22 18 } 23 19 … … 76 72 77 73 Mary *& Next( Mary * n ) { 78 return (Mary *)Next( (Colable *)n ); 79 } 80 81 bool listed( Mary * n ) { 82 return Next( (Colable *)n ) != 0p; 74 return (Mary *)Next( (Fred *)n ); 83 75 } 84 76 -
tests/sequence.cfa
r9dd31e7 r7522692 21 21 Fred *& Next( Fred * n ) { 22 22 return (Fred *)Next( (Colable *)n ); 23 }24 25 bool listed( Fred * n ) {26 return Next( (Colable *)n ) != 0p;27 23 } 28 24 … … 89 85 90 86 Mary *& Back( Mary * n ) { 91 return (Mary *)Back( ( Seqable*)n );87 return (Mary *)Back( (Fred *)n ); 92 88 } 93 89 94 90 Mary *& Next( Mary * n ) { 95 return (Mary *)Next( (Colable *)n ); 96 } 97 98 bool listed( Mary * n ) { 99 return Next( (Colable *)n ) != 0p; 91 return (Mary *)Next( (Fred *)n ); 100 92 } 101 93 -
tests/stack.cfa
r9dd31e7 r7522692 16 16 Fred *& Next( Fred * n ) { 17 17 return (Fred *)Next( (Colable *)n ); 18 }19 20 bool listed( Fred * n ) {21 return Next( (Colable *)n ) != 0p;22 18 } 23 19 … … 76 72 77 73 Mary *& Next( Mary * n ) { 78 return (Mary *)Next( (Colable *)n ); 79 } 80 81 bool listed( Mary * n ) { 82 return Next( (Colable *)n ) != 0p; 74 return (Mary *)Next( (Fred *)n ); 83 75 } 84 76
Note: See TracChangeset
for help on using the changeset viewer.