[Orxonox-commit 1355] r6073 - in code/trunk/src/libraries: core network network/packet network/synchronisable
rgrieder at orxonox.net
rgrieder at orxonox.net
Sun Nov 15 23:44:59 CET 2009
Author: rgrieder
Date: 2009-11-15 23:44:58 +0100 (Sun, 15 Nov 2009)
New Revision: 6073
Modified:
code/trunk/src/libraries/core/DynLib.cc
code/trunk/src/libraries/core/DynLib.h
code/trunk/src/libraries/core/DynLibManager.cc
code/trunk/src/libraries/network/FunctionCallManager.cc
code/trunk/src/libraries/network/FunctionCallManager.h
code/trunk/src/libraries/network/GamestateHandler.h
code/trunk/src/libraries/network/Host.h
code/trunk/src/libraries/network/TrafficControl.cc
code/trunk/src/libraries/network/TrafficControl.h
code/trunk/src/libraries/network/packet/Acknowledgement.h
code/trunk/src/libraries/network/packet/Chat.h
code/trunk/src/libraries/network/packet/ClassID.h
code/trunk/src/libraries/network/packet/DeleteObjects.h
code/trunk/src/libraries/network/packet/FunctionCalls.h
code/trunk/src/libraries/network/packet/FunctionIDs.h
code/trunk/src/libraries/network/packet/Gamestate.h
code/trunk/src/libraries/network/packet/Packet.h
code/trunk/src/libraries/network/packet/Welcome.h
code/trunk/src/libraries/network/synchronisable/NetworkCallback.h
Log:
Found more tabs in the trunk.
Modified: code/trunk/src/libraries/core/DynLib.cc
===================================================================
--- code/trunk/src/libraries/core/DynLib.cc 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/core/DynLib.cc 2009-11-15 22:44:58 UTC (rev 6073)
@@ -69,7 +69,7 @@
// Log library load
COUT(2) << "Loading module " << mName << std::endl;
- std::string name = mName;
+ std::string name = mName;
#ifdef ORXONOX_PLATFORM_LINUX
// dlopen() does not add .so to the filename, like windows does for .dll
if (name.substr(name.length() - 3, 3) != ".so")
@@ -92,12 +92,12 @@
COUT(4) << "Unloading module " << mName << std::endl;
if( DYNLIB_UNLOAD( m_hInst ) )
- {
+ {
ThrowException(
General,
"Could not unload dynamic library " + mName +
". System Error: " + dynlibError());
- }
+ }
}
Modified: code/trunk/src/libraries/core/DynLib.h
===================================================================
--- code/trunk/src/libraries/core/DynLib.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/core/DynLib.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -71,10 +71,10 @@
@see
Resource
*/
- class _CoreExport DynLib
+ class _CoreExport DynLib
{
- protected:
- std::string mName;
+ protected:
+ std::string mName;
/// Gets the last loading error
std::string dynlibError(void);
public:
@@ -94,8 +94,8 @@
/** Unload the library
*/
void unload();
- /// Get the name of the library
- const std::string& getName(void) const { return mName; }
+ /// Get the name of the library
+ const std::string& getName(void) const { return mName; }
/**
Returns the address of the given symbol from the loaded library.
Modified: code/trunk/src/libraries/core/DynLibManager.cc
===================================================================
--- code/trunk/src/libraries/core/DynLibManager.cc 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/core/DynLibManager.cc 2009-11-15 22:44:58 UTC (rev 6073)
@@ -40,37 +40,37 @@
DynLibManager* DynLibManager::singletonPtr_s = 0;
//-----------------------------------------------------------------------
- DynLibManager::DynLibManager()
- {
- }
- //-----------------------------------------------------------------------
+ DynLibManager::DynLibManager()
+ {
+ }
+ //-----------------------------------------------------------------------
DynLib* DynLibManager::load( const std::string& filename)
{
- DynLibList::iterator i = mLibList.find(filename);
- if (i != mLibList.end())
- {
- return i->second;
- }
- else
- {
- DynLib* pLib = new DynLib(filename);
- pLib->load();
- mLibList[filename] = pLib;
- return pLib;
- }
+ DynLibList::iterator i = mLibList.find(filename);
+ if (i != mLibList.end())
+ {
+ return i->second;
+ }
+ else
+ {
+ DynLib* pLib = new DynLib(filename);
+ pLib->load();
+ mLibList[filename] = pLib;
+ return pLib;
+ }
}
- //-----------------------------------------------------------------------
- void DynLibManager::unload(DynLib* lib)
- {
- DynLibList::iterator i = mLibList.find(lib->getName());
- if (i != mLibList.end())
- {
- mLibList.erase(i);
- }
- lib->unload();
- delete lib;
- }
- //-----------------------------------------------------------------------
+ //-----------------------------------------------------------------------
+ void DynLibManager::unload(DynLib* lib)
+ {
+ DynLibList::iterator i = mLibList.find(lib->getName());
+ if (i != mLibList.end())
+ {
+ mLibList.erase(i);
+ }
+ lib->unload();
+ delete lib;
+ }
+ //-----------------------------------------------------------------------
DynLibManager::~DynLibManager()
{
// Unload & delete resources in turn
Modified: code/trunk/src/libraries/network/FunctionCallManager.cc
===================================================================
--- code/trunk/src/libraries/network/FunctionCallManager.cc 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/FunctionCallManager.cc 2009-11-15 22:44:58 UTC (rev 6073)
@@ -42,7 +42,7 @@
FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls;
FunctionCallManager::clientMap_[clientID]->setClientID(clientID);
}
- FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID);
+ FunctionCallManager::clientMap_[clientID]->addCallStatic(functionID);
}
void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1)
{
Modified: code/trunk/src/libraries/network/FunctionCallManager.h
===================================================================
--- code/trunk/src/libraries/network/FunctionCallManager.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/FunctionCallManager.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -36,7 +36,7 @@
namespace orxonox {
/**
- @author
+ @author
*/
class _NetworkExport FunctionCallManager
Modified: code/trunk/src/libraries/network/GamestateHandler.h
===================================================================
--- code/trunk/src/libraries/network/GamestateHandler.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/GamestateHandler.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -34,7 +34,7 @@
namespace orxonox {
/**
- @author Oliver Scheuss
+ @author Oliver Scheuss
*/
class _NetworkExport GamestateHandler{
private:
Modified: code/trunk/src/libraries/network/Host.h
===================================================================
--- code/trunk/src/libraries/network/Host.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/Host.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -44,7 +44,7 @@
* - Makes server and client a singleton
* - defines static functions available on both server and client
* - is the interface to be used when communicating with the network
-* @author Oliver Scheuss
+* @author Oliver Scheuss
*/
class _NetworkExport Host{
private:
Modified: code/trunk/src/libraries/network/TrafficControl.cc
===================================================================
--- code/trunk/src/libraries/network/TrafficControl.cc 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/TrafficControl.cc 2009-11-15 22:44:58 UTC (rev 6073)
@@ -63,26 +63,26 @@
/**
*Initializing protected members
*/
- TrafficControl *TrafficControl::instance_=0;
+ TrafficControl *TrafficControl::instance_=0;
- /**
- * @brief Constructor: assures that only one reference will be created and sets the pointer
- */
- TrafficControl::TrafficControl()
- {
+ /**
+ * @brief Constructor: assures that only one reference will be created and sets the pointer
+ */
+ TrafficControl::TrafficControl()
+ {
RegisterObject(TrafficControl);
- assert(instance_==0);
- instance_=this;
+ assert(instance_==0);
+ instance_=this;
this->setConfigValues();
- }
+ }
- /**
- * @brief Destructor: resets the instance pointer to 0
- */
- TrafficControl::~TrafficControl()
- {
- instance_=0;
- }
+ /**
+ * @brief Destructor: resets the instance pointer to 0
+ */
+ TrafficControl::~TrafficControl()
+ {
+ instance_=0;
+ }
/**
*Definition of public members
@@ -120,13 +120,13 @@
- void TrafficControl::processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj>& list)
- {
- currentClientID=clientID;
- currentGamestateID=gamestateID;
- evaluateList(clientID, list);
- return;
- }
+ void TrafficControl::processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj>& list)
+ {
+ currentClientID=clientID;
+ currentGamestateID=gamestateID;
+ evaluateList(clientID, list);
+ return;
+ }
TrafficControl *TrafficControl::getInstance()
{
@@ -134,11 +134,11 @@
return instance_;
}
- void TrafficControl::ack(unsigned int clientID, unsigned int gamestateID)
- {
+ void TrafficControl::ack(unsigned int clientID, unsigned int gamestateID)
+ {
if ( !this->bActive_ )
return;
- std::list<obj>::iterator itvec; // iterator to iterate through the acked objects
+ std::list<obj>::iterator itvec; // iterator to iterate through the acked objects
//assertions to make sure the maps already exist
assert(clientListTemp_.find(clientID) != clientListTemp_.end() );
@@ -150,7 +150,7 @@
std::map<unsigned int, std::list<obj> >& objectListTemp = clientListTemp_[clientID];
for(itvec = objectListTemp[gamestateID].begin(); itvec != objectListTemp[gamestateID].end(); itvec++)
- {
+ {
if(objectListPerm.find((*itvec).objID) != objectListPerm.end()) // check whether the obj already exists in our lists
{
objectListPerm[(*itvec).objID].objCurGS = gamestateID;
@@ -164,25 +164,25 @@
objectListPerm[(*itvec).objID].objCreatorID = (*itvec).objCreatorID;
objectListPerm[(*itvec).objID].objSize = (*itvec).objSize;
}
- }
- // remove temporary list (with acked objects) from the map
+ }
+ // remove temporary list (with acked objects) from the map
objectListTemp.erase( objectListTemp.find(gamestateID) );
- }
+ }
/**
*Definition of private members
*/
- /**
- *updateClientListPerm
- *returns void
- */
- void TrafficControl::insertinClientListPerm(unsigned int clientID, obj objinf)
- {
- std::map<unsigned int,std::map<unsigned int, objInfo> >::iterator itperm;//iterator clientListPerm over clientIDs
+ /**
+ *updateClientListPerm
+ *returns void
+ */
+ void TrafficControl::insertinClientListPerm(unsigned int clientID, obj objinf)
+ {
+ std::map<unsigned int,std::map<unsigned int, objInfo> >::iterator itperm;//iterator clientListPerm over clientIDs
unsigned int gsid=GAMESTATEID_INITIAL, gsdiff=currentGamestateID, prioperm=Synchronisable::getSynchronisable(objinf.objID)->getPriority(), priomom=0;
clientListPerm_[clientID][objinf.objID] = objInfo(objinf.objID, objinf.objCreatorID,gsid,gsdiff, objinf.objSize,prioperm,priomom);
- }
+ }
/**
* updateClientListTemp
@@ -222,11 +222,11 @@
}
- /**
- *evaluateList evaluates whether new obj are there, whether there are things to be updatet and manipulates all this.
- */
- void TrafficControl::evaluateList(unsigned int clientID, std::list<obj>& list)
- {
+ /**
+ *evaluateList evaluates whether new obj are there, whether there are things to be updatet and manipulates all this.
+ */
+ void TrafficControl::evaluateList(unsigned int clientID, std::list<obj>& list)
+ {
if( bActive_ )
{
Modified: code/trunk/src/libraries/network/TrafficControl.h
===================================================================
--- code/trunk/src/libraries/network/TrafficControl.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/TrafficControl.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -129,7 +129,7 @@
void processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj>& list); //gets a pointer to the list (containing objectIDs) and sorts it
static void processAck(unsigned int clientID, unsigned int gamestateID)
{ return instance_->ack(clientID, gamestateID); }
- void deleteObject(unsigned int objectID); // this function gets called when an object has been deleted (in order to clean up lists and maps)
+ void deleteObject(unsigned int objectID); // this function gets called when an object has been deleted (in order to clean up lists and maps)
bool prioritySort(uint32_t clientID, obj i, obj j);
bool dataSort(obj i, obj j);
Modified: code/trunk/src/libraries/network/packet/Acknowledgement.h
===================================================================
--- code/trunk/src/libraries/network/packet/Acknowledgement.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/packet/Acknowledgement.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -36,7 +36,7 @@
const unsigned int ACKID_NACK = 0;
namespace packet {
/**
- @author
+ @author
*/
class _NetworkExport Acknowledgement : public Packet
{
Modified: code/trunk/src/libraries/network/packet/Chat.h
===================================================================
--- code/trunk/src/libraries/network/packet/Chat.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/packet/Chat.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -35,7 +35,7 @@
namespace orxonox {
namespace packet {
/**
- @author
+ @author
*/
class _NetworkExport Chat : public Packet
{
Modified: code/trunk/src/libraries/network/packet/ClassID.h
===================================================================
--- code/trunk/src/libraries/network/packet/ClassID.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/packet/ClassID.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -37,7 +37,7 @@
/**
- @author
+ @author
*/
class _NetworkExport ClassID : public Packet
{
Modified: code/trunk/src/libraries/network/packet/DeleteObjects.h
===================================================================
--- code/trunk/src/libraries/network/packet/DeleteObjects.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/packet/DeleteObjects.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -34,7 +34,7 @@
namespace orxonox {
namespace packet {
/**
- @author
+ @author
*/
class _NetworkExport DeleteObjects : public Packet
{
Modified: code/trunk/src/libraries/network/packet/FunctionCalls.h
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionCalls.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/packet/FunctionCalls.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -39,7 +39,7 @@
namespace packet {
/**
- @author
+ @author
*/
Modified: code/trunk/src/libraries/network/packet/FunctionIDs.h
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionIDs.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/packet/FunctionIDs.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -37,7 +37,7 @@
/**
- @author
+ @author
*/
class _NetworkExport FunctionIDs : public Packet
{
Modified: code/trunk/src/libraries/network/packet/Gamestate.h
===================================================================
--- code/trunk/src/libraries/network/packet/Gamestate.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/packet/Gamestate.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -95,7 +95,7 @@
};
/**
- @author Oliver Scheuss
+ @author Oliver Scheuss
*/
class _NetworkExport Gamestate: public Packet{
public:
Modified: code/trunk/src/libraries/network/packet/Packet.h
===================================================================
--- code/trunk/src/libraries/network/packet/Packet.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/packet/Packet.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -56,7 +56,7 @@
}
/**
- @author Oliver Scheuss <scheusso [at] ee.ethz.ch>
+ @author Oliver Scheuss <scheusso [at] ee.ethz.ch>
*/
class _NetworkExport Packet{
public:
Modified: code/trunk/src/libraries/network/packet/Welcome.h
===================================================================
--- code/trunk/src/libraries/network/packet/Welcome.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/packet/Welcome.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -35,7 +35,7 @@
namespace packet {
/**
- @author
+ @author
*/
class _NetworkExport Welcome : public Packet
{
Modified: code/trunk/src/libraries/network/synchronisable/NetworkCallback.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/NetworkCallback.h 2009-11-15 21:40:53 UTC (rev 6072)
+++ code/trunk/src/libraries/network/synchronisable/NetworkCallback.h 2009-11-15 22:44:58 UTC (rev 6073)
@@ -48,7 +48,7 @@
{
public:
NetworkCallback(T* object, void (T::*function) (void)) : object_(object), function_(function) {}
- virtual ~NetworkCallback() {}
+ virtual ~NetworkCallback() {}
virtual void call()
{ (this->object_->*function_)(); }
More information about the Orxonox-commit
mailing list