Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/avi_play/src/lib/network/network_manager.h @ 5924

Last change on this file since 5924 was 5924, checked in by bensch, 18 years ago

orxonox/branches/avi_play: merged the Trunk back into the branche avi_play again

merged with command svn merge ../trunk/ avi_play/ -r5845:HEAD
no conflicts

File size: 1.4 KB
RevLine 
[5521]1/*!
2 * @file network_manager.h
3  *  Main interface for the network module. Manages all the modules
4*/
5
[5533]6/* you will want to add such a a line at your header file also, since it will
7   prevent c++ from including your code twice*/
[5521]8#ifndef _NETWORK_MANGER
9#define _NETWORK_MANAGER
10
[5647]11/* include this file, it contains some default definitions */
12#include "netdefs.h"
[5533]13
14/* include base_object.h since all classes are derived from this one */
[5521]15#include "base_object.h"
16
[5647]17
[5572]18/* forward declarations for the header file (include the header via #include "bla.h" in the source file) */
[5566]19class NetworkStream;
[5572]20class Synchronizeable;
[5566]21template<typename> class tList;
[5521]22
[5566]23/* and here is the class itsself*/
[5521]24class NetworkManager : public BaseObject
25{
26
27public:
28
29  NetworkManager();
30  ~NetworkManager();
[5533]31
[5522]32  void initialize();
[5525]33  void shutdown();
[5804]34
[5648]35  NetworkStream& establishConnection(IPaddress& address, Synchronizeable& sync);
[5647]36  NetworkStream& establishConnection(const char& hostName, const Synchronizeable& sync);
[5804]37  NetworkStream& createServer(Synchronizeable& sync, unsigned int port);
[5522]38  void shutdownConnection();
[5804]39
[5522]40  void synchronize();
[5533]41
[5566]42private:
[5924]43  const std::list<BaseObject*>*    netStreamList;            // list with refs to all network streams
44  const std::list<BaseObject*>*    syncList;                 // list of synchronizeables
[5804]45
[5521]46};
47
48
49
50#endif /* _NETWORK_MANAGER */
Note: See TracBrowser for help on using the repository browser.