Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5611 in orxonox.OLD for branches


Ignore:
Timestamp:
Nov 16, 2005, 4:34:31 PM (19 years ago)
Author:
bknecht
Message:

added a few varibales and functions

Location:
branches/network/src/lib/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/data_stream.cc

    r5601 r5611  
    2323using namespace std;
    2424
     25/**
     26 * This is the empty construktor
     27 */
     28DataStream::DataStream()
     29{
     30                       
     31}
    2532
    2633/**
    2734 * This constructor creates a new DataStream and connects it to both streams (upStream, downStream)
    2835 */
    29 DataStream::DataStream(DataStream& upStream, DataStream& downStream)
     36DataStream::DataStream(DataStream& inStream, DataStream& outStream)
    3037{
    3138    this->setClassID(CL_DATA_STREAM, "DataStream");
     39    downStream = &outStream;
     40    upStream = &inStream;
    3241}
    3342
     
    3847{
    3948    this->setClassID(CL_DATA_STREAM, "DataStream");
     49    nSocket = &socket;
    4050}
    4151
     
    4353 * This constructor creates a new DataStream and connects the Synchronizeable to it
    4454 */
    45 DataStream::DataStream(Synchronizeable& sync, DataStream& downStream)
     55DataStream::DataStream(Synchronizeable& sync, DataStream& outStream)
    4656{
    4757    this->setClassID(CL_DATA_STREAM, "DataStream");
     58    downStream = &outStream;
    4859}
    4960
     
    5162 * This constructor creates a new DataStream and connects the NetworkSocket to it
    5263 */
    53 DataStream::DataStream(DataStream& upStream, NetworkSocket& socket)
     64DataStream::DataStream(DataStream& inStream, NetworkSocket& socket)
    5465{
    5566     this->setClassID(CL_DATA_STREAM, "DataStream");
     67     upStream = &inStream;
     68     nSocket = &socket;
    5669}
    5770
     
    6275{
    6376
     77}
     78
     79/**
     80 * This funtion connects this stream to a Synchronizable object. This stream is the top of the stream-chain.
     81 */
     82void DataStream::connectSynchronizeable(Synchronizeable& sync)
     83{
     84     
     85}
     86   
     87/**
     88 * And this function disconnects the Synch-object and sets it to NULL   
     89 */
     90void 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 */   
     98void DataStream::connectNetworkSocket(NetworkSocket& socket)
     99{
     100     
     101}
     102   
     103/**
     104 * And this function disconnects the Socket and sets it to NULL
     105 */   
     106void DataStream::disconnectNetworkSocket()
     107{
     108     
    64109}
    65110
  • branches/network/src/lib/network/data_stream.h

    r5604 r5611  
    2020      public:
    2121      DataStream() {}
    22       DataStream(DataStream& upStream, DataStream& downStream);
     22      DataStream(DataStream& inStream, DataStream& outStream);
    2323      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);
    2626     
    2727      ~DataStream();
    2828     
     29     
     30     
     31     
     32      void connectNetworkSocket(NetworkSocket& socket);
     33     
     34      void disconnectNetworkSocket();
     35     
     36      void connectSynchronizeable(Synchronizeable& sync);
     37     
     38      void disconnectSynchronizeable();
    2939
    30      
    3140      void connectUpStream(DataStream& upStream);
    3241
     
    4958      DataStream* upStream;
    5059      DataStream* downStream;
     60      NetworkSocket* nSocket;
    5161
    5262};
Note: See TracChangeset for help on using the changeset viewer.