[5554] | 1 | /* |
---|
| 2 | orxonox - the future of 3D-vertical-scrollers |
---|
[5524] | 3 | |
---|
[5554] | 4 | Copyright (C) 2004 orx |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 9 | any later version. |
---|
| 10 | |
---|
| 11 | ### File Specific: |
---|
| 12 | main-programmer: Benjamin Knecht |
---|
| 13 | co-programmer: ... |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | /* include Data_stream Header */ |
---|
[5562] | 17 | #include "data_stream.h" |
---|
[5524] | 18 | |
---|
[5554] | 19 | |
---|
| 20 | |
---|
[5562] | 21 | |
---|
[5554] | 22 | /* using namespace std is default, this needs to be here */ |
---|
| 23 | using namespace std; |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | /** |
---|
[5562] | 27 | * This constructor creates a new DataStream and connects it to both streams (upStream, downStream) |
---|
[5554] | 28 | */ |
---|
[5562] | 29 | DataStream::DataStream(DataStream& upStream, DataStream& downStream) |
---|
[5554] | 30 | { |
---|
| 31 | |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | /** |
---|
[5562] | 35 | * This constructor creates a new DataStream and connects it to a synchronizeable object and the NetworkSocket |
---|
| 36 | */ |
---|
| 37 | DataStream::DataStream(Synchronizeable& sync, NetworkSocket& socket) |
---|
| 38 | { |
---|
| 39 | |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | /** |
---|
[5554] | 43 | * standart deconstructor |
---|
| 44 | */ |
---|
[5562] | 45 | DataStream::~DataStream() |
---|
[5524] | 46 | { |
---|
| 47 | |
---|
| 48 | } |
---|
| 49 | |
---|
[5554] | 50 | /** |
---|
[5562] | 51 | * This function connects this stream to another stream. The connected DataStream is an up-stream, meaning |
---|
| 52 | * that the stream is "further away" from the NetworkSocket. The local reference upStream will be set to this |
---|
| 53 | * Stream |
---|
[5554] | 54 | */ |
---|
[5562] | 55 | void DataStream::connectUpStream(DataStream& upStream) |
---|
[5524] | 56 | { |
---|
| 57 | |
---|
[5554] | 58 | } |
---|
| 59 | |
---|
[5562] | 60 | /** |
---|
| 61 | * This function connects this stream to another stream. The connected DataStream is an down-stream, meaning |
---|
| 62 | * that the stream is "closer" to the NetworkSocket. |
---|
| 63 | */ |
---|
| 64 | void DataStream::connectDownStream(DataStream& upStream) |
---|
| 65 | { |
---|
| 66 | |
---|
| 67 | } |
---|
[5554] | 68 | |
---|
| 69 | /** |
---|
[5562] | 70 | * This function disconnects the upStream and sets it to NULL |
---|
[5554] | 71 | */ |
---|
[5562] | 72 | void DataStream::disconnectUpStream() |
---|
[5554] | 73 | { |
---|
[5524] | 74 | |
---|
| 75 | } |
---|
| 76 | |
---|
[5562] | 77 | /** |
---|
| 78 | * This function disconnects the downStream and sets it to NULL |
---|
| 79 | */ |
---|
| 80 | void DataStream::disconnectDownStream() |
---|
| 81 | { |
---|
| 82 | |
---|
| 83 | } |
---|
[5554] | 84 | |
---|
| 85 | /** |
---|
[5562] | 86 | * This function moves the data from the downStream object to the upStream object and changes the data if necessary. |
---|
| 87 | * This function is virtual and therefore needs to be extended by the derived class |
---|
[5554] | 88 | */ |
---|
| 89 | void DataStream::processData() |
---|
[5524] | 90 | { |
---|
| 91 | |
---|
| 92 | } |
---|
| 93 | |
---|
[5554] | 94 | |
---|
| 95 | /** |
---|
[5562] | 96 | * This function writes the binary data to the local data. You will have to copy each byte and not only dublicate |
---|
| 97 | * it. |
---|
[5554] | 98 | */ |
---|
| 99 | void DataStream::write() |
---|
[5524] | 100 | { |
---|
| 101 | |
---|
| 102 | } |
---|
| 103 | |
---|
[5554] | 104 | |
---|
| 105 | /** |
---|
[5562] | 106 | * This function returns a reference to the local upData data array. So it can be read by an upper Stream |
---|
| 107 | * The reading function will have to copy the whole data and musn't just reference it! |
---|
| 108 | * This function is only called from other connected DataStreams to read the data. |
---|
[5554] | 109 | */ |
---|
[5562] | 110 | byte& DataStream::read() |
---|
[5524] | 111 | { |
---|
| 112 | |
---|
| 113 | } |
---|