Changeset 5611 in orxonox.OLD for branches/network
- Timestamp:
- Nov 16, 2005, 4:34:31 PM (19 years ago)
- Location:
- branches/network/src/lib/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/data_stream.cc
r5601 r5611 23 23 using namespace std; 24 24 25 /** 26 * This is the empty construktor 27 */ 28 DataStream::DataStream() 29 { 30 31 } 25 32 26 33 /** 27 34 * This constructor creates a new DataStream and connects it to both streams (upStream, downStream) 28 35 */ 29 DataStream::DataStream(DataStream& upStream, DataStream& downStream)36 DataStream::DataStream(DataStream& inStream, DataStream& outStream) 30 37 { 31 38 this->setClassID(CL_DATA_STREAM, "DataStream"); 39 downStream = &outStream; 40 upStream = &inStream; 32 41 } 33 42 … … 38 47 { 39 48 this->setClassID(CL_DATA_STREAM, "DataStream"); 49 nSocket = &socket; 40 50 } 41 51 … … 43 53 * This constructor creates a new DataStream and connects the Synchronizeable to it 44 54 */ 45 DataStream::DataStream(Synchronizeable& sync, DataStream& downStream)55 DataStream::DataStream(Synchronizeable& sync, DataStream& outStream) 46 56 { 47 57 this->setClassID(CL_DATA_STREAM, "DataStream"); 58 downStream = &outStream; 48 59 } 49 60 … … 51 62 * This constructor creates a new DataStream and connects the NetworkSocket to it 52 63 */ 53 DataStream::DataStream(DataStream& upStream, NetworkSocket& socket)64 DataStream::DataStream(DataStream& inStream, NetworkSocket& socket) 54 65 { 55 66 this->setClassID(CL_DATA_STREAM, "DataStream"); 67 upStream = &inStream; 68 nSocket = &socket; 56 69 } 57 70 … … 62 75 { 63 76 77 } 78 79 /** 80 * This funtion connects this stream to a Synchronizable object. This stream is the top of the stream-chain. 81 */ 82 void DataStream::connectSynchronizeable(Synchronizeable& sync) 83 { 84 85 } 86 87 /** 88 * And this function disconnects the Synch-object and sets it to NULL 89 */ 90 void DataStream::disconnectSynchronizeable() 91 { 92 93 } 94 95 /** 96 * This function connects the stream to a NetworkSocket. This stream is the bottom of the stream-chain 97 */ 98 void DataStream::connectNetworkSocket(NetworkSocket& socket) 99 { 100 101 } 102 103 /** 104 * And this function disconnects the Socket and sets it to NULL 105 */ 106 void DataStream::disconnectNetworkSocket() 107 { 108 64 109 } 65 110 -
branches/network/src/lib/network/data_stream.h
r5604 r5611 20 20 public: 21 21 DataStream() {} 22 DataStream(DataStream& upStream, DataStream& downStream);22 DataStream(DataStream& inStream, DataStream& outStream); 23 23 DataStream(Synchronizeable& sync, NetworkSocket& socket); 24 DataStream(DataStream& upStream, NetworkSocket& socket);25 DataStream(Synchronizeable& sync, DataStream& downStream);24 DataStream(DataStream& inStream, NetworkSocket& socket); 25 DataStream(Synchronizeable& sync, DataStream& outStream); 26 26 27 27 ~DataStream(); 28 28 29 30 31 32 void connectNetworkSocket(NetworkSocket& socket); 33 34 void disconnectNetworkSocket(); 35 36 void connectSynchronizeable(Synchronizeable& sync); 37 38 void disconnectSynchronizeable(); 29 39 30 31 40 void connectUpStream(DataStream& upStream); 32 41 … … 49 58 DataStream* upStream; 50 59 DataStream* downStream; 60 NetworkSocket* nSocket; 51 61 52 62 };
Note: See TracChangeset
for help on using the changeset viewer.