This document aims to describe the file structure and contents of this project.
The root directory contains the primary header files to define and implement iterators and iterator instances (i.e iterables)
File | Description |
---|---|
|
Utility macros to define a typeclass and its instance. |
|
Utility macros to define and use a |
|
Primary file containing macros to define the |
The examples/
directory contains usage examples of the Iterator typeclass pattern.
This also contains a subdirectory - iterutils
, which contains utilities to work with generic Iterable
s.
File | Description |
---|---|
|
Macros to define an This struct stores a source iterable, and keeps track of how many elements to extract from it. This is used to implement a Defines a macro to implement |
|
Macros to define an This struct stores a source iterable, and a function to map over the iterable. Defines a macro to implement |
|
Declarations of all the utility functions to be exposed to the examples. |
|
Definitions of the utility functions. |
The usage of these iterutils and the primary header files are demonstrated by the files in examples/
-
File | Description |
---|---|
|
Includes all the primary headers from the root directory. Also defines
|
|
Declarations for all the functions demonstrating iterable usage. |
|
The main function definition, executes the functions demonstrating iterable usage. (Declared in |
|
Declarations for functions and structs to be used to use an array as an This defines the |
|
Definitons for functions be used to use an array as an This implements the |
|
Declarations for functions and structs to be used to use a singly linked list as an This defines the |
|
Definitons for functions to be used to use a singly linked list as an This implements the |
|
Declarations for functions and structs to be used to use an |
|
Definitions for functions to be used to use an |
|
Example function that wraps an array into an |
|
Example function that wraps a singly linked list into an |
|
Example function that wraps an array into an |
|
Example function that prints the elements from an |
|
Example usage of the |