| Line | |
|---|
| 1 | #ifndef SLOT_H |
|---|
| 2 | #define SLOT_H |
|---|
| 3 | |
|---|
| 4 | #include <stdint.h> |
|---|
| 5 | #include <iostream> |
|---|
| 6 | |
|---|
| 7 | using namespace std; |
|---|
| 8 | |
|---|
| 9 | namespace hierarchy_memory |
|---|
| 10 | { |
|---|
| 11 | namespace sort_file |
|---|
| 12 | { |
|---|
| 13 | template <class T> |
|---|
| 14 | class slot_t |
|---|
| 15 | { |
|---|
| 16 | public : uint32_t delay; // delay of disponibilty of data |
|---|
| 17 | public : T data; |
|---|
| 18 | |
|---|
| 19 | public : slot_t () |
|---|
| 20 | { |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | public : slot_t (uint32_t delay, T data) |
|---|
| 24 | { |
|---|
| 25 | this->delay = delay; |
|---|
| 26 | this->data = data; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | public : friend ostream& operator<< (ostream& output_stream, const slot_t & x) |
|---|
| 30 | { |
|---|
| 31 | output_stream << x.delay << " " << x.data; |
|---|
| 32 | return output_stream; |
|---|
| 33 | } |
|---|
| 34 | }; |
|---|
| 35 | |
|---|
| 36 | }; //sort_file |
|---|
| 37 | }; //hierarchy_memory |
|---|
| 38 | #endif //!SLOT_H |
|---|
| 39 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.