ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since a0d9f94 was
51b73452,
checked in by Peter A. Buhr <pabuhr@…>, 11 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | #ifndef ITERATOR_H |
---|
2 | #define ITERATOR_H |
---|
3 | |
---|
4 | #include "iostream.h" |
---|
5 | |
---|
6 | context iterator( type iterator_type, type elt_type ) |
---|
7 | { |
---|
8 | iterator_type ?++( iterator_type* ); |
---|
9 | iterator_type ++?( iterator_type* ); |
---|
10 | int ?==?( iterator_type, iterator_type ); |
---|
11 | int ?!=?( iterator_type, iterator_type ); |
---|
12 | lvalue elt_type *?( iterator_type ); |
---|
13 | }; |
---|
14 | |
---|
15 | context iterator_for( type iterator_type, type collection_type, type elt_type | iterator( iterator_type, elt_type ) ) |
---|
16 | { |
---|
17 | /// [ iterator_type begin, iterator_type end ] get_iterators( collection_type ); |
---|
18 | iterator_type get_begin( collection_type ); |
---|
19 | iterator_type get_end( collection_type ); |
---|
20 | }; |
---|
21 | |
---|
22 | forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) ) |
---|
23 | void for_each( iterator_type begin, iterator_type end, void (*func)( elt_type ) ); |
---|
24 | |
---|
25 | forall( type elt_type | writeable( elt_type ), |
---|
26 | type iterator_type | iterator( iterator_type, elt_type ), |
---|
27 | dtype os_type | ostream( os_type ) ) |
---|
28 | void write_all( iterator_type begin, iterator_type end, os_type *os ); |
---|
29 | |
---|
30 | #endif /* #ifndef ITERATOR_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.