Skip to content

Commit b1e47e1

Browse files
committed
add comments guards
1 parent d696b5f commit b1e47e1

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ this...
1010

1111
```c++
1212
int main () {
13+
// ...
14+
1315
source | through | sink;
1416
return 0;
1517
}

index.hxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef PUSH_STREAM_H
2+
#define PUSH_STREAM_H
3+
14
#include <string>
25
#include <iostream>
36
#include <vector>
@@ -35,3 +38,5 @@ Stream& operator | (Stream& source, Stream& sink) {
3538
sink.source->pipe();
3639
return sink;
3740
}
41+
42+
#endif

test/index.cxx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ using Buffer = std::vector<String>;
1414

1515
using namespace Hyper::Util;
1616

17+
//
18+
// A source stream implementation
19+
//
1720
struct Source : Stream {
1821
Buffer buf { "paper", "clips", "for", "sale" };
1922
size_t i = 0;
@@ -40,6 +43,9 @@ struct Source : Stream {
4043
}
4144
};
4245

46+
//
47+
// A sink stream implementation
48+
//
4349
struct Sink : Stream {
4450
Buffer buf;
4551

@@ -55,6 +61,9 @@ struct Sink : Stream {
5561
}
5662
};
5763

64+
//
65+
// A through/transform stream implementation
66+
//
5867
struct Through : Stream {
5968
using Callback = std::function<String(String)>;
6069
Callback callback;
@@ -94,6 +103,9 @@ struct Through : Stream {
94103
}
95104
};
96105

106+
//
107+
// An async source stream implementation
108+
//
97109
struct SourceAsync : Stream {
98110
std::ifstream file;
99111

@@ -151,6 +163,9 @@ struct SourceAsync : Stream {
151163
}
152164
};
153165

166+
//
167+
// Tests!
168+
//
154169
int main () {
155170
TAP::Test t;
156171

0 commit comments

Comments
 (0)