Changeset 1591 for code/branches/core3/src/network
- Timestamp:
- Jun 12, 2008, 2:00:15 AM (17 years ago)
- Location:
- code/branches/core3/src/network
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/network/ConnectionManager.cc
r1574 r1591 44 44 #include "core/CoreIncludes.h" 45 45 #include "core/BaseObject.h" 46 #include "core/Iterator.h" 46 47 #include "objects/SpaceShip.h" 47 48 #include "util/Math.h" … … 337 338 bool ConnectionManager::removeShip(ClientInformation *client){ 338 339 int id=client->getShipID(); 339 orxonox:: Iterator<orxonox::SpaceShip>it;340 orxonox::ObjectList<orxonox::SpaceShip>::iterator it; 340 341 for(it = orxonox::ObjectList<orxonox::SpaceShip>::begin(); it; ++it){ 341 342 if(it->objectID!=id) -
code/branches/core3/src/network/GameStateClient.cc
r1574 r1591 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/BaseObject.h" 35 #include "core/Iterator.h" 35 36 #include "Synchronisable.h" 36 37 … … 137 138 * @return iterator pointing to the next object in the list 138 139 */ 139 void GameStateClient::removeObject(orxonox:: Iterator<Synchronisable>&it) {140 orxonox:: Iterator<Synchronisable>temp=it;140 void GameStateClient::removeObject(orxonox::ObjectList<Synchronisable>::iterator &it) { 141 orxonox::ObjectList<Synchronisable>::iterator temp=it; 141 142 ++it; 142 143 delete *temp; … … 151 152 COUT(4) << "loadSnapshot: loading gs: " << state->id << std::endl; 152 153 // get the start of the Synchronisable list 153 orxonox:: Iterator<Synchronisable>it=orxonox::ObjectList<Synchronisable>::begin();154 orxonox::ObjectList<Synchronisable>::iterator it=orxonox::ObjectList<Synchronisable>::begin(); 154 155 syncData sync; 155 156 // loop as long as we have some data ;) … … 222 223 int tempsize=0; 223 224 // get the start of the Synchronisable list 224 orxonox:: Iterator<Synchronisable>it;225 orxonox::ObjectList<Synchronisable>::iterator it; 225 226 // struct for return value of Synchronisable::getData() 226 227 syncData sync; -
code/branches/core3/src/network/GameStateClient.h
r1505 r1591 42 42 43 43 #include <map> 44 // 44 // 45 45 #include "NetworkPrereqs.h" 46 46 #include "core/CorePrereqs.h" … … 58 58 GameStateClient(); 59 59 ~GameStateClient(); 60 60 61 61 void addGameState(GameStateCompressed *gs); 62 62 int processGameState(); … … 72 72 GameState *decode(GameState *old, GameStateCompressed *diff); 73 73 GameState *decode(GameStateCompressed *x); 74 void removeObject(orxonox:: Iterator<Synchronisable> &it);74 void removeObject(orxonox::ObjectListIterator<Synchronisable> &it); 75 75 void printGameStateMap(); 76 76 bool saveShipCache(); … … 83 83 orxonox::SpaceShip *myShip_; 84 84 syncData shipCache_; 85 86 87 88 85 86 87 88 89 89 public: 90 90 //#### ADDED FOR TESTING PURPOSE #### -
code/branches/core3/src/network/GameStateManager.cc
r1574 r1591 48 48 #include "core/CoreIncludes.h" 49 49 #include "core/BaseObject.h" 50 #include "core/Iterator.h" 50 51 #include "ClientInformation.h" 51 52 #include "Synchronisable.h" … … 180 181 int tempsize=0; 181 182 // get the start of the Synchronisable list 182 orxonox:: Iterator<Synchronisable>it;183 orxonox::ObjectList<Synchronisable>::iterator it; 183 184 // struct for return value of Synchronisable::getData() 184 185 syncData sync; … … 246 247 COUT(4) << "loadSnapshot: loading gs: " << state->id << std::endl; 247 248 // get the start of the Synchronisable list 248 orxonox:: Iterator<Synchronisable>it=orxonox::ObjectList<Synchronisable>::begin();249 orxonox::ObjectList<Synchronisable>::iterator it=orxonox::ObjectList<Synchronisable>::begin(); 249 250 syncData sync; 250 251 /*ClientInformation *client = head_->findClient(clientID); -
code/branches/core3/src/network/Server.cc
r1574 r1591 52 52 #include "objects/SpaceShip.h" 53 53 #include "core/ConsoleCommand.h" 54 #include "core/Iterator.h" 54 55 55 56 namespace network … … 400 401 401 402 //boost::recursive_mutex::scoped_lock lock(head_->mutex_); 402 orxonox:: Iterator<orxonox::SpaceShip>it = orxonox::ObjectList<orxonox::SpaceShip>::begin();403 orxonox::ObjectList<orxonox::SpaceShip>::iterator it = orxonox::ObjectList<orxonox::SpaceShip>::begin(); 403 404 ClientInformation *client = clients->findClient(&event->peer->address); 404 405 if(!client) … … 409 410 continue; 410 411 } 411 orxonox:: Iterator<orxonox::SpaceShip>temp=it;412 orxonox::ObjectList<orxonox::SpaceShip>::iterator temp=it; 412 413 ++it; 413 414 delete *temp; -
code/branches/core3/src/network/Synchronisable.h
r1534 r1591 85 85 Synchronisable(); 86 86 private: 87 /* bool removeObject( Iterator<Synchronisable>it);*/87 /* bool removeObject(ObjectList<Synchronisable>::iterator it);*/ 88 88 89 89 std::list<synchronisableVariable *> *syncList;
Note: See TracChangeset
for help on using the changeset viewer.