Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/network/data_stream.cc @ 5565

Last change on this file since 5565 was 5562, checked in by bknecht, 19 years ago

Corrected Errors in DataStream-Files according patrick and updated according https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DataStream

File size: 2.6 KB
RevLine 
[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 */
23using namespace std;
24
25
26/**
[5562]27 * This constructor creates a new DataStream and connects it to both streams (upStream, downStream)
[5554]28 */
[5562]29DataStream::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 */
37DataStream::DataStream(Synchronizeable& sync, NetworkSocket& socket)
38{
39 
40}
41
42/**
[5554]43 *  standart deconstructor
44 */
[5562]45DataStream::~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]55void 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 */
64void 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]72void DataStream::disconnectUpStream()
[5554]73{
[5524]74     
75}
76
[5562]77/**
78 * This function disconnects the downStream and sets it to NULL
79 */
80void 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 */
89void 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 */
99void 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]110byte& DataStream::read()
[5524]111{
112     
113}
Note: See TracBrowser for help on using the repository browser.