Changes in / [9dd31e7:7522692]


Ignore:
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/collection.hfa

    r9dd31e7 r7522692  
    3535        //              return (T *)Next( (Colable *)n );
    3636        //      }
    37 
    38         //      bool listed( T * n ) {
    39         //              return Next( (Colable *)n ) != 0p;
    40         //      }
    4137        // } // distribution
    4238} // distribution
    4339
     40forall( dtype T | { T *& Next ( T * ); } ) {
     41        bool listed( T * n ) {
     42                return Next( n ) != 0p;
     43        }
     44}
    4445
    4546struct Collection {
  • libcfa/src/bits/queue.hfa

    r9dd31e7 r7522692  
    33#include "bits/collection.hfa"
    44
    5 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) {
     5forall( dtype T | { T *& Next ( T * ); } ) {
    66        struct Queue {
    77                inline Collection;                                                              // Plan 9 inheritance
     
    142142} // distribution
    143143
    144 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) {
     144forall( dtype T | { T *& Next ( T * ); } ) {
    145145        struct QueueIter {
    146146                inline ColIter;                                                                 // Plan 9 inheritance
  • libcfa/src/bits/sequence.hfa

    r9dd31e7 r7522692  
    3636} // distribution
    3737
    38 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); bool listed ( T * ); } ) {
     38forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) {
    3939        struct Sequence {
    4040                inline Collection;                                                              // Plan 9 inheritance
     
    216216} // distribution
    217217
    218 forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); bool listed ( T * ); } ) {
     218forall( dtype T | { T *& Back ( T * ); T *& Next ( T * ); } ) {
    219219        // SeqIter(T) is used to iterate over a Sequence(T) in head-to-tail order.
    220220        struct SeqIter {
  • libcfa/src/bits/stack.hfa

    r9dd31e7 r7522692  
    33#include "bits/collection.hfa"
    44
    5 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) {
     5forall( dtype T | { T *& Next ( T * ); } ) {
    66        struct Stack {
    77                inline Collection;                                                              // Plan 9 inheritance
     
    5858
    5959
    60 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) {
     60forall( dtype T | { T *& Next ( T * ); } ) {
    6161        struct StackIter {
    6262                inline ColIter;                                                                 // Plan 9 inheritance
  • tests/multi_list.cfa

    r9dd31e7 r7522692  
    2727}
    2828
    29 bool listed( TaskDL * n ) {
    30         return Next( (Colable *)n ) != 0p;
    31 }
    32 
    3329struct TaskSL {
    3430        inline Colable;
     
    4541TaskSL *& Next( TaskSL * n ) {
    4642        return (TaskSL *)Next( (Colable *)n );
    47 }
    48 
    49 bool listed( TaskSL * n ) {
    50         return Next( (Colable *)n ) != 0p;
    5143}
    5244
  • tests/queue.cfa

    r9dd31e7 r7522692  
    1616        Fred *& Next( Fred * n ) {
    1717                return (Fred *)Next( (Colable *)n );
    18         }
    19 
    20         bool listed( Fred * n ) {
    21                 return Next( (Colable *)n ) != 0p;
    2218        }
    2319
     
    7672
    7773        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 );
    8375        }
    8476
  • tests/sequence.cfa

    r9dd31e7 r7522692  
    2121        Fred *& Next( Fred * n ) {
    2222                return (Fred *)Next( (Colable *)n );
    23         }
    24 
    25         bool listed( Fred * n ) {
    26                 return Next( (Colable *)n ) != 0p;
    2723        }
    2824
     
    8985
    9086        Mary *& Back( Mary * n ) {
    91                 return (Mary *)Back( (Seqable *)n );
     87                return (Mary *)Back( (Fred *)n );
    9288        }
    9389
    9490        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 );
    10092        }
    10193
  • tests/stack.cfa

    r9dd31e7 r7522692  
    1616        Fred *& Next( Fred * n ) {
    1717                return (Fred *)Next( (Colable *)n );
    18         }
    19 
    20         bool listed( Fred * n ) {
    21                 return Next( (Colable *)n ) != 0p;
    2218        }
    2319
     
    7672
    7773        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 );
    8375        }
    8476
Note: See TracChangeset for help on using the changeset viewer.