Changes in libcfa/src/bits/collection.hfa [5e82d56:636d3715]
- File:
-
- 1 edited
-
libcfa/src/bits/collection.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/collection.hfa
r5e82d56 r636d3715 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 ;15 return next != 0p; 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 } // distribution 25 35 } // distribution 36 26 37 27 38 struct Collection { … … 41 52 return root == 0p; 42 53 } 54 43 55 void * head( Collection & collection ) with( collection ) { 44 56 return root; … … 55 67 curr = 0p; 56 68 } // post: elts = null 69 70 forall( dtype T ) { 71 T * Curr( ColIter & ci ) with( ci ) { 72 return (T *)curr; 73 } 74 } // distribution 57 75 } // distribution
Note:
See TracChangeset
for help on using the changeset viewer.