Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5572 in orxonox.OLD


Ignore:
Timestamp:
Nov 15, 2005, 7:17:20 PM (18 years ago)
Author:
patrick
Message:

network: added little functionality to the network_manager

Location:
branches/network/src/lib/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_manager.cc

    r5566 r5572  
    2323#include "network_stream.h"
    2424#include "list.h"
     25#include "class_list.h"
    2526
    2627
     
    7273NetworkManager::NetworkManager()
    7374{
    74   this->netStreamList = new tList<NetworkStream>();
    75   NetworkStream* ns = new NetworkStream();
     75  /* set the class id for the base object */
     76  //this->setClassID(CL_NETWORK_MANAGER, "NetworkManager");
     77  /* initialize the references */
     78  this->netStreamList = NULL;
     79  this->syncList = NULL;
    7680}
    7781
     
    8892 */
    8993void NetworkManager::initialize()
    90 {}
     94{
     95  /* get the synchronizeable list from the class list */
     96  //this->netStreamList = ClassList::getClassList(/*CL_SYNCHRONIZEABLE*/0x0);
     97}
    9198
    9299
     
    103110 * @param synchronizeable: reference to the sync object
    104111 */
    105 void NetworkManager::establishConnection(/* address, port, object reference*/)
    106 {}
     112NetworkStream& NetworkManager::establishConnection(/* address, port, object reference*/)
     113{
     114  /* creating a new network stream */
     115  NetworkStream* netStream = new NetworkStream();
     116}
    107117
    108118
     
    114124
    115125
    116 /**
    117  *  registers a listener at the network manager
    118  * @param listener: the reference to the listener to be added
    119  */
    120 void NetworkManager::registerListener(/* listener reference*/)
    121 {}
    122126
    123127/**
  • branches/network/src/lib/network/network_manager.h

    r5566 r5572  
    1313#include "base_object.h"
    1414
    15 /* this are class predefinitions. the includes are in the source file */
     15/* forward declarations for the header file (include the header via #include "bla.h" in the source file) */
    1616class NetworkStream;
     17class Synchronizeable;
    1718template<typename> class tList;
    1819
     
    2829  void initialize();
    2930  void shutdown();
    30   void establishConnection(/* address, port, object reference*/);
     31 
     32  NetworkStream& establishConnection(/* address, port, object reference*/);
    3133  void shutdownConnection();
    32 
    33   void registerListener();
     34 
    3435  void synchronize();
    3536
    3637private:
    3738  tList<NetworkStream>*    netStreamList;            // list with refs to all network streams
     39  tList<Synchronizeable>*  syncList;                 // list of synchronizeables
    3840   
    3941};
Note: See TracChangeset for help on using the changeset viewer.