[5530] | 1 | /* |
---|
[5520] | 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 | |
---|
[5525] | 17 | /* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module |
---|
[5530] | 18 | For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput |
---|
[5525] | 19 | */ |
---|
[5530] | 20 | #define DEBUG_MODULE_NETWORK |
---|
[5525] | 21 | |
---|
| 22 | |
---|
[5566] | 23 | #include "network_stream.h" |
---|
| 24 | #include "list.h" |
---|
| 25 | |
---|
| 26 | |
---|
[5525] | 27 | /* include your own header */ |
---|
[5520] | 28 | #include "network_manager.h" |
---|
| 29 | |
---|
[5530] | 30 | /* include this file, it contains some default definitions */ |
---|
| 31 | #include "netdefs.h" |
---|
| 32 | |
---|
[5525] | 33 | /* using namespace std is default, this needs to be here */ |
---|
[5520] | 34 | using namespace std; |
---|
| 35 | |
---|
| 36 | |
---|
[5525] | 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: |
---|
[5520] | 39 | |
---|
[5530] | 40 | |
---|
| 41 | In file network_manager.h |
---|
| 42 | |
---|
[5525] | 43 | class NetworkManager |
---|
| 44 | { |
---|
| 45 | int doSomeStuff(float argument, float* pointer); |
---|
[5530] | 46 | } |
---|
[5520] | 47 | |
---|
[5525] | 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... |
---|
[5530] | 55 | * @param pointer: this is the pointer to nowhereland |
---|
| 56 | * return: whatever the function returns: for example an index, number, etc. |
---|
| 57 | * / |
---|
[5525] | 58 | int NetworkManager::doSomeStuff(float argument, float* pointer) |
---|
| 59 | { |
---|
[5530] | 60 | // whaterver you want to do |
---|
| 61 | } |
---|
[5525] | 62 | |
---|
[5530] | 63 | |
---|
[5525] | 64 | if you want to make automake compile your files: you will want to add the file names to the local Makefile.am |
---|
[5530] | 65 | |
---|
[5525] | 66 | ************************************/ |
---|
| 67 | |
---|
[5530] | 68 | |
---|
[5520] | 69 | /** |
---|
| 70 | * standard constructor |
---|
| 71 | */ |
---|
| 72 | NetworkManager::NetworkManager() |
---|
[5566] | 73 | { |
---|
| 74 | this->netStreamList = new tList<NetworkStream>(); |
---|
| 75 | NetworkStream* ns = new NetworkStream(); |
---|
| 76 | } |
---|
[5520] | 77 | |
---|
| 78 | |
---|
| 79 | /** |
---|
| 80 | * standard deconstructor |
---|
| 81 | */ |
---|
| 82 | NetworkManager::~NetworkManager() |
---|
| 83 | {} |
---|
| 84 | |
---|
[5522] | 85 | |
---|
| 86 | /** |
---|
| 87 | * initializes the network manager |
---|
| 88 | */ |
---|
| 89 | void NetworkManager::initialize() |
---|
| 90 | {} |
---|
| 91 | |
---|
[5530] | 92 | |
---|
[5522] | 93 | /** |
---|
| 94 | * shutsdown the network manager |
---|
| 95 | */ |
---|
| 96 | void 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 | */ |
---|
[5525] | 105 | void NetworkManager::establishConnection(/* address, port, object reference*/) |
---|
[5522] | 106 | {} |
---|
| 107 | |
---|
| 108 | |
---|
| 109 | /** |
---|
| 110 | * teardown a connection |
---|
| 111 | */ |
---|
| 112 | void NetworkManager::shutdownConnection() |
---|
| 113 | {} |
---|
| 114 | |
---|
[5530] | 115 | |
---|
[5522] | 116 | /** |
---|
| 117 | * registers a listener at the network manager |
---|
| 118 | * @param listener: the reference to the listener to be added |
---|
| 119 | */ |
---|
[5525] | 120 | void NetworkManager::registerListener(/* listener reference*/) |
---|
[5522] | 121 | {} |
---|
| 122 | |
---|
| 123 | /** |
---|
| 124 | * sync the network |
---|
| 125 | */ |
---|
| 126 | void NetworkManager::synchronize() |
---|
| 127 | {} |
---|
| 128 | |
---|
| 129 | |
---|