Changeset 6388 for code/branches/presentation2/src/libraries
- Timestamp:
- Dec 21, 2009, 1:28:10 PM (15 years ago)
- Location:
- code/branches/presentation2/src/libraries
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/core/ConfigValueIncludes.h
r6368 r6388 174 174 */ 175 175 #define ModifyConfigValue(varname, modifier, ...) \ 176 ModifyConfigValueGeneric(this, &varname, #varname, modifier, __VA_ARGS__) 176 ModifyConfigValueGeneric(this, &varname, #varname, modifier, __VA_ARGS__) 177 177 178 178 #endif /* _ConfigValueIncludes_H__ */ -
code/branches/presentation2/src/libraries/core/EventIncludes.h
r6387 r6388 82 82 /** 83 83 @brief This macro is needed to fire an event with this name. The event name must previously be declared with @ref CreateEventName. 84 */ 84 */ 85 85 #define FireEventName(classname, name) \ 86 86 eventname##classname##name -
code/branches/presentation2/src/libraries/core/GUIManager.h
r6371 r6388 67 67 ~GUIManager(); 68 68 69 void preUpdate(const Clock& time); 69 void preUpdate(const Clock& time); 70 70 71 71 static void showGUI(const std::string& name, bool hidePrevious=false, bool showCursor=true); -
code/branches/presentation2/src/libraries/core/MemoryArchive.cc
r5940 r6388 64 64 } 65 65 66 void MemoryArchive::findFiles(const String& pattern, bool bRecursive, 66 void MemoryArchive::findFiles(const String& pattern, bool bRecursive, 67 67 bool bDirs, StringVector* simpleList, FileInfoList* detailList) 68 68 { … … 118 118 } 119 119 120 FileInfoListPtr MemoryArchive::findFileInfo(const String& pattern, 120 FileInfoListPtr MemoryArchive::findFileInfo(const String& pattern, 121 121 bool recursive, bool dirs) 122 122 { -
code/branches/presentation2/src/libraries/core/MemoryArchive.h
r5781 r6388 79 79 80 80 private: 81 void findFiles(const Ogre::String& pattern, bool bRecursive, 81 void findFiles(const Ogre::String& pattern, bool bRecursive, 82 82 bool bDirs, Ogre::StringVector* simpleList, Ogre::FileInfoList* detailList); 83 83 -
code/branches/presentation2/src/libraries/core/Resource.h
r6203 r6388 73 73 must provide a fully qualified name to this method. 74 74 @param groupName 75 The name of the resource group; this determines which 76 locations are searched. 75 The name of the resource group; this determines which 76 locations are searched. 77 77 @param searchGroupsIfNotFound 78 If true, if the resource is not found in 78 If true, if the resource is not found in 79 79 the group specified, other groups will be searched. 80 80 @return … … 96 96 @brief 97 97 Open all resources matching a given pattern (which can contain 98 the character '*' as a wildcard), and return a collection of 98 the character '*' as a wildcard), and return a collection of 99 99 DataStream objects on them. 100 100 @param pattern … … 112 112 113 113 /** 114 Find out if the named file exists in a group. 114 Find out if the named file exists in a group. 115 115 @param filename 116 116 Fully qualified name of the file to test for -
code/branches/presentation2/src/libraries/core/input/InputCommands.h
r5781 r6388 71 71 @brief 72 72 Executes a simple command with no additional paramters. 73 @return 73 @return 74 74 True if command execution was successful, false otherwise. 75 75 */ -
code/branches/presentation2/src/libraries/core/input/InputManager.cc
r6183 r6388 508 508 if (mouseStates.empty()) 509 509 requestedMode = MouseMode::Nonexclusive; 510 else 510 else 511 511 requestedMode = mouseStates.front()->getMouseMode(); 512 512 if (requestedMode != MouseMode::Dontcare && mouseMode_ != requestedMode) … … 554 554 } 555 555 556 //! Gets called by WindowEventListener upon focus change --> clear buffers 556 //! Gets called by WindowEventListener upon focus change --> clear buffers 557 557 void InputManager::windowFocusChanged() 558 558 { -
code/branches/presentation2/src/libraries/core/input/JoyStickQuantityListener.h
r5781 r6388 29 29 /** 30 30 @file 31 @brief 31 @brief 32 32 */ 33 33 -
code/branches/presentation2/src/libraries/core/input/KeyBinder.cc
r6387 r6388 285 285 286 286 void KeyBinder::addButtonToCommand(std::string command, Button* button) 287 { 287 { 288 288 std::ostringstream stream; 289 289 stream << button->groupName_ << "." << button->name_; -
code/branches/presentation2/src/libraries/network/ClientConnection.cc
r6387 r6388 148 148 149 149 uint32_t ClientConnection::getRTT() 150 { 150 { 151 151 assert(server_); 152 152 return server_->roundTripTime; -
code/branches/presentation2/src/libraries/network/ClientConnectionListener.cc
r6387 r6388 36 36 { 37 37 ClientConnectionListener::ClientConnectionListener() 38 { 39 RegisterRootObject(ClientConnectionListener); 38 { 39 RegisterRootObject(ClientConnectionListener); 40 40 } 41 41 -
code/branches/presentation2/src/libraries/network/FunctionCallManager.cc
r6387 r6388 37 37 38 38 void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID) 39 { 40 if(clientMap_.find(clientID)==clientMap_.end()) 39 { 40 if(clientMap_.find(clientID)==clientMap_.end()) 41 41 { 42 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 43 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 44 } 42 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 43 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 44 } 45 45 FunctionCallManager::clientMap_[clientID]->addCallStatic(functionID); 46 46 } 47 47 void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1) 48 { 49 if(clientMap_.find(clientID)==clientMap_.end()) 48 { 49 if(clientMap_.find(clientID)==clientMap_.end()) 50 50 { 51 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 52 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 53 } 51 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 52 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 53 } 54 54 FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1); 55 55 } 56 56 void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2) 57 { 58 if(clientMap_.find(clientID)==clientMap_.end()) 57 { 58 if(clientMap_.find(clientID)==clientMap_.end()) 59 59 { 60 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 61 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 62 } 60 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 61 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 62 } 63 63 FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1, &mt2); 64 64 } 65 65 void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3) 66 { 67 if(clientMap_.find(clientID)==clientMap_.end()) 66 { 67 if(clientMap_.find(clientID)==clientMap_.end()) 68 68 { 69 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 70 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 71 } 69 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 70 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 71 } 72 72 FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1, &mt2, &mt3); 73 73 } 74 74 void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4) 75 { 76 if(clientMap_.find(clientID)==clientMap_.end()) 75 { 76 if(clientMap_.find(clientID)==clientMap_.end()) 77 77 { 78 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 79 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 80 } 78 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 79 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 80 } 81 81 FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1, &mt2, &mt3, &mt4); 82 82 } 83 83 void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5) 84 { 85 if(clientMap_.find(clientID)==clientMap_.end()) 84 { 85 if(clientMap_.find(clientID)==clientMap_.end()) 86 86 { 87 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 88 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 89 } 87 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 88 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 89 } 90 90 FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1, &mt2, &mt3, &mt4, &mt5); 91 91 } … … 95 95 96 96 void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID) 97 { 98 if(clientMap_.find(clientID)==clientMap_.end()) 97 { 98 if(clientMap_.find(clientID)==clientMap_.end()) 99 99 { 100 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 101 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 102 } 100 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 101 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 102 } 103 103 FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID); 104 104 } 105 105 void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1) 106 { 107 if(clientMap_.find(clientID)==clientMap_.end()) 106 { 107 if(clientMap_.find(clientID)==clientMap_.end()) 108 108 { 109 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 110 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 111 } 109 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 110 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 111 } 112 112 FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1); 113 113 } 114 114 void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2) 115 { 116 if(clientMap_.find(clientID)==clientMap_.end()) 115 { 116 if(clientMap_.find(clientID)==clientMap_.end()) 117 117 { 118 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 119 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 120 } 118 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 119 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 120 } 121 121 FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1, &mt2); 122 122 } 123 123 void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3) 124 { 125 if(clientMap_.find(clientID)==clientMap_.end()) 124 { 125 if(clientMap_.find(clientID)==clientMap_.end()) 126 126 { 127 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 128 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 129 } 127 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 128 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 129 } 130 130 FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1, &mt2, &mt3); 131 131 } 132 132 void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4) 133 { 134 if(clientMap_.find(clientID)==clientMap_.end()) 133 { 134 if(clientMap_.find(clientID)==clientMap_.end()) 135 135 { 136 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 137 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 138 } 136 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 137 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 138 } 139 139 FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1, &mt2, &mt3, &mt4); 140 140 } 141 141 void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5) 142 { 143 if(clientMap_.find(clientID)==clientMap_.end()) 142 { 143 if(clientMap_.find(clientID)==clientMap_.end()) 144 144 { 145 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 146 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 147 } 145 FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 146 FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 147 } 148 148 FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1, &mt2, &mt3, &mt4, &mt5); 149 149 } -
code/branches/presentation2/src/libraries/network/GamestateManager.cc
r6387 r6388 159 159 clientGamestates.push(0); 160 160 finishGamestate( cid, &clientGamestates.back(), client, reference ); 161 //FunctorMember<GamestateManager>* functor = 161 //FunctorMember<GamestateManager>* functor = 162 162 // ExecutorMember<GamestateManager>* executor = createExecutor( createFunctor(&GamestateManager::finishGamestate, this) ); 163 163 // executor->setDefaultValues( cid, &clientGamestates.back(), client, reference ); -
code/branches/presentation2/src/libraries/network/NetworkFunction.h
r6387 r6388 83 83 { 84 84 std::map<std::string, NetworkFunctionBase*>& map = NetworkFunctionBase::getNameMap(); 85 assert( map.find(name)!=map.end() ); 85 assert( map.find(name)!=map.end() ); 86 86 map[name]->setNetworkID(id); 87 87 } … … 139 139 static NetworkMemberFunctionBase* getFunction( const NetworkFunctionPointer& p ){ assert( functorMap_.find(p) != functorMap_.end() ); return functorMap_[p]; } 140 140 141 // 141 // 142 142 virtual void call(uint32_t objectID)=0; 143 143 virtual void call(uint32_t objectID, const MultiType& mt1)=0; … … 159 159 160 160 inline void call(uint32_t objectID) 161 { 161 { 162 162 if ( Synchronisable::getSynchronisable(objectID)!=0 ) 163 163 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID))); 164 164 } 165 165 inline void call(uint32_t objectID, const MultiType& mt1) 166 { 166 { 167 167 if ( Synchronisable::getSynchronisable(objectID)!=0 ) 168 168 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1); 169 169 } 170 170 inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2) 171 { 171 { 172 172 if ( Synchronisable::getSynchronisable(objectID)!=0 ) 173 173 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2); 174 174 } 175 175 inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3) 176 { 176 { 177 177 if ( Synchronisable::getSynchronisable(objectID)!=0 ) 178 178 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3); 179 179 } 180 180 inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4) 181 { 181 { 182 182 if ( Synchronisable::getSynchronisable(objectID)!=0 ) 183 183 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3, mt4); 184 184 } 185 185 inline void call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5) 186 { 186 { 187 187 if ( Synchronisable::getSynchronisable(objectID)!=0 ) 188 188 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3, mt4, mt5); -
code/branches/presentation2/src/libraries/network/Server.cc
r6387 r6388 162 162 163 163 /** 164 * @brief: returns ping time to client in milliseconds 164 * @brief: returns ping time to client in milliseconds 165 165 */ 166 166 unsigned int Server::getRTT(unsigned int clientID){ -
code/branches/presentation2/src/libraries/network/TrafficControl.h
r6387 r6388 105 105 *evaluates Data given (list) and produces result(->Data to be updated) 106 106 */ 107 void evaluateList(unsigned int clientID, std::list<obj>& list);//done 107 void evaluateList(unsigned int clientID, std::list<obj>& list);//done 108 108 void ack(unsigned int clientID, unsigned int gamestateID); // this function gets called when the server receives an ack from the client 109 109 … … 121 121 /** 122 122 *is being used by GSManager from Server: 123 *list contains: ObjIds, CreatorIds, Size (in this order) from Client XY 123 *list contains: ObjIds, CreatorIds, Size (in this order) from Client XY 124 124 *Elements of list are accessed by *list[i] 125 125 *Elements of struct i are therefore: *list[i].objID -
code/branches/presentation2/src/libraries/network/packet/FunctionIDs.cc
r6387 r6388 48 48 FunctionIDs::FunctionIDs( ) : Packet(){ 49 49 std::string functionname; 50 unsigned int nrOfFunctions=0; 50 unsigned int nrOfFunctions=0; 51 51 unsigned int packetSize=2*sizeof(uint32_t); //space for the packetID and for the nroffunctions 52 52 uint32_t networkID; -
code/branches/presentation2/src/libraries/network/packet/Gamestate.cc
r6387 r6388 437 437 // uint8_t *ndata = new uint8_t[dest_length*sizeof(uint8_t)+GamestateHeader::getSize()]; 438 438 // uint8_t *dest = ndata + GamestateHeader::getSize(); 439 // 440 // 439 // 440 // 441 441 // // LOOP-UNROLLED DIFFING 442 442 // uint32_t *dest32 = (uint32_t*)dest, *base32 = (uint32_t*)basep, *gs32 = (uint32_t*)gs; … … 465 465 // } 466 466 // } 467 // 467 // 468 468 // Gamestate *g = new Gamestate(ndata, getClientID()); 469 469 // *(g->header_) = *header_; -
code/branches/presentation2/src/libraries/network/packet/Packet.cc
r6387 r6388 102 102 Destroys a packet completely. 103 103 104 That also means destroying the ENetPacket if one exists. There 104 That also means destroying the ENetPacket if one exists. There 105 105 */ 106 106 Packet::~Packet(){ -
code/branches/presentation2/src/libraries/network/synchronisable/NetworkCallbackManager.cc
r6387 r6388 36 36 37 37 void NetworkCallbackManager::registerCallback(NetworkCallbackBase *cb) 38 { 39 callbackSet_.insert(cb); 38 { 39 callbackSet_.insert(cb); 40 40 } 41 41 void NetworkCallbackManager::deleteCallback(NetworkCallbackBase *cb) -
code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.h
r6387 r6388 66 66 67 67 /** 68 * @brief: stores information about a Synchronisable 69 * 68 * @brief: stores information about a Synchronisable 69 * 70 70 * This class stores the information about a Synchronisable (objectID_, classID_, creatorID_, dataSize) 71 71 * in an emulated bitset. -
code/branches/presentation2/src/libraries/util/Serialise.h
r6387 r6388 616 616 template <> inline uint32_t returnSize( const mbool& variable ) 617 617 { 618 return returnSize( (unsigned char&)((mbool&)variable).getMemory() ); 618 return returnSize( (unsigned char&)((mbool&)variable).getMemory() ); 619 619 } 620 620
Note: See TracChangeset
for help on using the changeset viewer.