Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5600 in orxonox.OLD for branches/network/src/lib


Ignore:
Timestamp:
Nov 16, 2005, 2:47:41 PM (19 years ago)
Author:
bknecht
Message:

new Constructors and BaseObject registration for DataStream

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

Legend:

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

    r5569 r5600  
    2929DataStream::DataStream(DataStream& upStream, DataStream& downStream)
    3030{
    31 
     31    this->setClassID(CL_DATA_STREAM, "DataStream");
    3232}
    3333
     
    3737DataStream::DataStream(Synchronizeable& sync, NetworkSocket& socket)
    3838{
     39    this->setClassID(CL_DATA_STREAM, "DataStream");
     40}
    3941
     42/**
     43 * This constructor creates a new DataStream and connects the Synchronizeable to it
     44 */
     45DataStream::DataStream(Synchronizable& sync, DataStream& downStream)
     46{
     47    this->setClassID(CL_DATA_STREAM, "DataStream");
     48}
     49
     50/**
     51 * This constructor creates a new DataStream and connects the NetworkSocket to it
     52 */
     53DataStream::DataStream(DataStream& upStream, NetworkSocekt& socket)
     54{
     55     this->setClassID(CL_DATA_STREAM, "DataStream");
    4056}
    4157
     
    92108}
    93109
     110/**
     111 * Following functions are protected and only visible inside the object and from derived classes
     112 */
    94113
    95114/**
     
    97116 * it.
    98117 */
    99 void DataStream::write(byte& data)
     118void DataStream::writeBytes(byte& data)
    100119{
    101120
     
    108127 * This function is only called from other connected DataStreams to read the data.
    109128 */
    110 byte& DataStream::read()
     129byte& DataStream::readBytes()
    111130{
    112131
  • branches/network/src/lib/network/data_stream.h

    r5569 r5600  
    2020      DataStream(DataStream& upStream, DataStream& downStream);
    2121      DataStream(Synchronizeable& sync, NetworkSocket& socket);
     22      DataStream(DataStream& upStream, NetworkSocket& socket);
     23      DataStream(Synchronizeable& sync, DataStream& downStream);
     24     
    2225      ~DataStream();
    2326
     
    4144
    4245      protected:
    43       void write(byte& data);
     46      void writeBytes(byte& data);
    4447
    45       byte& read();
     48      byte& readBytes();
    4649};
    4750
Note: See TracChangeset for help on using the changeset viewer.