Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 5809 was 5804, checked in by patrick, 19 years ago

network: changed the synchronizeable interface, since the data synchronizeables, more debug output

File size: 1.3 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:
[5575]43  tList<BaseObject>*    netStreamList;            // list with refs to all network streams
44  tList<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.