Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/lib/network/network_stream.cc


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/network_stream.cc

    r9656 r9869  
    3333#include "shared_network_data.h"
    3434#include "message_manager.h"
    35 #include "preferences.h"
     35#include "parser/preferences/preferences.h"
    3636#include "zip.h"
    3737
    38 #include "src/lib/util/loading/resource_manager.h"
    39 
    4038#include "network_log.h"
    4139
    4240#include "player_stats.h"
    4341
    44 #include "lib/util/loading/factory.h"
     42#include "loading/factory.h"
     43#include "loading/resource_manager.h"
    4544
    4645#include "debug.h"
    47 #include "class_list.h"
    48 #include <algorithm>
    49 
    5046
    5147#include "network_stream.h"
     
    5753#define PACKAGE_SIZE  256
    5854
    59 
     55ObjectListDefinition(NetworkStream);
    6056/**
    6157 * empty constructor
     
    118114{
    119115  /* set the class id for the base object */
    120   this->setClassID(CL_NETWORK_STREAM, "NetworkStream");
     116  this->registerObject(this, NetworkStream::_objectList);
    121117  this->clientSocket = NULL;
    122118  this->clientSoftSocket = NULL;
     
    970966
    971967      // if handshake not finished only sync handshake
    972       if ( peer->second.handshake && sync.getLeafClassID() != CL_HANDSHAKE )
     968      if ( peer->second.handshake && Handshake::staticClassID() != sync.getLeafClassID())
    973969        continue;
    974970
     
    976972      if ( ( SharedNetworkData::getInstance()->isMasterServer() ||
    977973             SharedNetworkData::getInstance()->isProxyServerActive() &&  peer->second.isClient())
    978              && sync.getLeafClassID() == CL_HANDSHAKE && sync.getUniqueID() != peer->second.userId )
     974             && Handshake::staticClassID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId )
    979975        continue;
    980976
    981977      /* list of synchronizeables that will never be synchronized over the network: */
    982978      // do not sync null parent
    983       if ( sync.getLeafClassID() == CL_NULL_PARENT )
     979      if ( NullParent::staticClassID() == sync.getLeafClassID())
    984980        continue;
    985981
     
    11901186          /* These are some small exeptions in creation: Not all objects can/should be created via Factory */
    11911187          /* Exception 1: NullParent */
    1192           if( leafClassId == CL_NULL_PARENT || leafClassId == CL_SYNCHRONIZEABLE || leafClassId == CL_NETWORK_GAME_MANAGER )
     1188          if( NullParent::staticClassID() == leafClassId || Synchronizeable::staticClassID() == leafClassId || NetworkGameManager::staticClassID() == leafClassId)
    11931189          {
    11941190            PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId);
     
    11971193          }
    11981194          else
    1199             b = Factory::fabricate( (ClassID)leafClassId );
     1195            ; /// FIXME CLASS_ID :: b = Factory::fabricate( leafClassId );
    12001196
    12011197          if ( !b )
     
    12061202          }
    12071203
    1208           if ( b->isA(CL_SYNCHRONIZEABLE) )
     1204          if ( b->isA(Synchronizeable::staticClassID()) )
    12091205          {
    12101206            sync = dynamic_cast<Synchronizeable*>(b);
     
    13031299    length = remainingBytesToWriteToDict;
    13041300
    1305   std::string fileName = ResourceManager::getInstance()->getDataDir();
     1301  std::string fileName = Resources::ResourceManager::getInstance()->mainGlobalPath().name();
    13061302  fileName += "/dicts/newdict";
    13071303
Note: See TracChangeset for help on using the changeset viewer.