Changes in libcfa/src/bits/collection.hfa [636d3715:5e82d56]
- File:
-
- 1 edited
-
libcfa/src/bits/collection.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/collection.hfa
r636d3715 r5e82d56 13 13 // return true iff *this is an element of a collection 14 14 bool listed( Colable & co ) with( co ) { // pre: this != 0 15 return next != 0 p;15 return next != 0; 16 16 } 17 17 … … 23 23 return cp->next; 24 24 } 25 26 forall( dtype T ) {27 T *& Next( T * n ) {28 return (T *)Next( (Colable *)n );29 }30 31 bool listed( T * n ) {32 return Next( (Colable *)n ) != 0p;33 }34 } // distribution35 25 } // distribution 36 37 26 38 27 struct Collection { … … 52 41 return root == 0p; 53 42 } 54 55 43 void * head( Collection & collection ) with( collection ) { 56 44 return root; … … 67 55 curr = 0p; 68 56 } // post: elts = null 69 70 forall( dtype T ) {71 T * Curr( ColIter & ci ) with( ci ) {72 return (T *)curr;73 }74 } // distribution75 57 } // distribution
Note:
See TracChangeset
for help on using the changeset viewer.