Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/network/network_manager.cc @ 5566

Last change on this file since 5566 was 5566, checked in by patrick, 18 years ago

network: added the missing NetworkStream files (they still need to be implemented) and added some small code to the NetworManager for preparation of the init process

File size: 2.9 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
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: Patrick Boenzli
13   co-programmer: ...
14*/
15
16
17/* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module
18   For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput
19*/
20#define DEBUG_MODULE_NETWORK
21
22
23#include "network_stream.h"
24#include "list.h"
25
26
27/* include your own header */
28#include "network_manager.h"
29
30/* include this file, it contains some default definitions */
31#include "netdefs.h"
32
33/* using namespace std is default, this needs to be here */
34using namespace std;
35
36
37/************************************
38  What you will see here are the function definitions from the header file (network_manager.h) with doxygen documentation. Here is an example:
39
40
41 In file network_manager.h
42
43 class NetworkManager
44 {
45   int doSomeStuff(float argument, float* pointer);
46 }
47
48 will be implemented in the source file as follows:
49
50 In file network_manager.cc
51
52 / **
53  *  this is the short description for this function: it just does some stuff
54  * @param argument: this is the first argument, stuff...
55  * @param pointer:  this is the pointer to nowhereland
56  * return: whatever the function returns: for example an index, number, etc.
57  * /
58 int NetworkManager::doSomeStuff(float argument, float* pointer)
59 {
60   // whaterver you want to do
61 }
62
63
64 if you want to make automake compile your files: you will want to add the file names to the local Makefile.am
65
66 ************************************/
67
68
69/**
70 *  standard constructor
71 */
72NetworkManager::NetworkManager()
73{
74  this->netStreamList = new tList<NetworkStream>();
75  NetworkStream* ns = new NetworkStream();
76}
77
78
79/**
80 *  standard deconstructor
81 */
82NetworkManager::~NetworkManager()
83{}
84
85
86/**
87 *  initializes the network manager
88 */
89void NetworkManager::initialize()
90{}
91
92
93/**
94 *  shutsdown the network manager
95 */
96void NetworkManager::shutdown()
97{}
98
99
100/**
101 *  creates a connection from one object to a host
102 * @param address: the address of the destination host
103 * @param synchronizeable: reference to the sync object
104 */
105void NetworkManager::establishConnection(/* address, port, object reference*/)
106{}
107
108
109/**
110 *  teardown a connection
111 */
112void NetworkManager::shutdownConnection()
113{}
114
115
116/**
117 *  registers a listener at the network manager
118 * @param listener: the reference to the listener to be added
119 */
120void NetworkManager::registerListener(/* listener reference*/)
121{}
122
123/**
124 *  sync the network
125 */
126void NetworkManager::synchronize()
127{}
128
129
Note: See TracBrowser for help on using the repository browser.