Last change
on this file since 311 was
285,
checked in by nicolasc, 17 years ago
|
cleaned up network, builds with CML
|
File size:
613 bytes
|
Line | |
---|
1 | #include "PacketBuffer.h" |
---|
2 | #include "PacketBuffer.cc" |
---|
3 | #include <iostream> |
---|
4 | #include <string> |
---|
5 | |
---|
6 | using namespace network; |
---|
7 | |
---|
8 | int main(int argc, char **argv[]){ |
---|
9 | PacketBuffer test = PacketBuffer(); |
---|
10 | PacketEnvelope p={8, 5}; |
---|
11 | if(test.isEmpty()) |
---|
12 | std::cout << "empty buffer" << std::endl; |
---|
13 | for(int i=0; i<10; i++){ |
---|
14 | p.data=i*i; |
---|
15 | std::cout << i << ": pushing " << p.data << std::endl; |
---|
16 | test.push(p); |
---|
17 | } |
---|
18 | std::cout << std::endl << "queue.print()" << std::endl; |
---|
19 | test.print(); |
---|
20 | while(!test.isEmpty()){ |
---|
21 | int i=test.pop().data; |
---|
22 | std::cout << "We popped the value " << i << std::endl; |
---|
23 | } |
---|
24 | return 0; |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.