Last change
on this file since 5973 was
5885,
checked in by bensch, 19 years ago
|
orxonox/trunk: classList: returns const lists
|
File size:
1.4 KB
|
Rev | Line | |
---|
[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] | 19 | class NetworkStream; |
---|
[5572] | 20 | class Synchronizeable; |
---|
[5566] | 21 | template<typename> class tList; |
---|
[5521] | 22 | |
---|
[5566] | 23 | /* and here is the class itsself*/ |
---|
[5521] | 24 | class NetworkManager : public BaseObject |
---|
| 25 | { |
---|
| 26 | |
---|
| 27 | public: |
---|
| 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] | 42 | private: |
---|
[5885] | 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.