Ignore:
File:
1 edited

Legend:

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

    r58870e6b raccc5dbb  
    11#pragma once
     2#include <stdio.h> // REMOVE THIS AFTER DEBUGGING
     3
    24
    35struct Colable {
    4         Colable * next;                                                                         // next node in the list
     6        struct Colable * next;                                                                          // next node in the list
    57        // invariant: (next != 0) <=> listed()
    68};
    7 
    8 inline {
     9#ifdef __cforall
     10static inline {
    911        // PUBLIC
    1012
     
    2830        }
    2931
    30         // wrappers to make Collection have T
    31         forall( dtype T ) {
    32                 T *& Next( T * n ) {
    33                         return (T *)Next( (Colable *)n );
    34                 }
     32        // // wrappers to make Collection have T
     33        // forall( dtype T ) {
     34        //      T *& Next( T * n ) {
     35        //              return (T *)Next( (Colable *)n );
     36        //      }
    3537
    36                 bool listed( T * n ) {
    37                         return Next( (Colable *)n ) != 0p;
    38                 }
    39         } // distribution
     38        //      bool listed( T * n ) {
     39        //              return Next( (Colable *)n ) != 0p;
     40        //      }
     41        // } // distribution
    4042} // distribution
    4143
     
    4547};
    4648
    47 inline {
     49static inline {
    4850        // class invariant: root == 0 & empty() | *root in *this
    4951        void ?{}( Collection &, const Collection & ) = void; // no copy
     
    6870};
    6971
    70 inline {
     72static inline {
    7173        void ?{}( ColIter & colIter ) with( colIter ) {
    7274                curr = 0p;
     
    7981        } // distribution
    8082} // distribution
     83#endif
Note: See TracChangeset for help on using the changeset viewer.