Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

network: modiefied the unit test to enable diffrent modes, extended the NetworkStream constructors interface and NetworkManager interface

File size: 1.3 KB
Line 
1/*!
2 * @file network_manager.h
3  *  Main interface for the network module. Manages all the modules
4*/
5
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*/
8#ifndef _NETWORK_MANGER
9#define _NETWORK_MANAGER
10
11/* include this file, it contains some default definitions */
12#include "netdefs.h"
13
14/* include base_object.h since all classes are derived from this one */
15#include "base_object.h"
16
17
18/* forward declarations for the header file (include the header via #include "bla.h" in the source file) */
19class NetworkStream;
20class Synchronizeable;
21template<typename> class tList;
22
23/* and here is the class itsself*/
24class NetworkManager : public BaseObject
25{
26
27public:
28
29  NetworkManager();
30  ~NetworkManager();
31
32  void initialize();
33  void shutdown();
34 
35  NetworkStream& establishConnection(const IPaddress& address, const Synchronizeable& sync);
36  NetworkStream& establishConnection(const char& hostName, const Synchronizeable& sync);
37  void shutdownConnection();
38 
39  void synchronize();
40
41private:
42  tList<BaseObject>*    netStreamList;            // list with refs to all network streams
43  tList<BaseObject>*  syncList;                 // list of synchronizeables
44   
45};
46
47
48
49#endif /* _NETWORK_MANAGER */
Note: See TracBrowser for help on using the repository browser.