Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6073 for code/trunk/src


Ignore:
Timestamp:
Nov 15, 2009, 11:44:58 PM (15 years ago)
Author:
rgrieder
Message:

Found more tabs in the trunk.

Location:
code/trunk/src/libraries
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/DynLib.cc

    r5750 r6073  
    7070        COUT(2) << "Loading module " << mName << std::endl;
    7171
    72                 std::string name = mName;
     72        std::string name = mName;
    7373#ifdef ORXONOX_PLATFORM_LINUX
    7474        // dlopen() does not add .so to the filename, like windows does for .dll
     
    9393
    9494        if( DYNLIB_UNLOAD( m_hInst ) )
    95                 {
     95        {
    9696            ThrowException(
    9797                General,
    9898                "Could not unload dynamic library " + mName +
    9999                ".  System Error: " + dynlibError());
    100                 }
     100        }
    101101
    102102    }
  • code/trunk/src/libraries/core/DynLib.h

    r5738 r6073  
    7272            Resource
    7373    */
    74         class _CoreExport DynLib
     74    class _CoreExport DynLib
    7575    {
    76         protected:
    77                 std::string mName;
     76    protected:
     77        std::string mName;
    7878        /// Gets the last loading error
    7979        std::string dynlibError(void);
     
    9595        */
    9696        void unload();
    97                 /// Get the name of the library
    98                 const std::string& getName(void) const { return mName; }
     97        /// Get the name of the library
     98        const std::string& getName(void) const { return mName; }
    9999
    100100        /**
  • code/trunk/src/libraries/core/DynLibManager.cc

    r5738 r6073  
    4141
    4242    //-----------------------------------------------------------------------
    43         DynLibManager::DynLibManager()
    44         {
    45         }
    46         //-----------------------------------------------------------------------
     43    DynLibManager::DynLibManager()
     44    {
     45    }
     46    //-----------------------------------------------------------------------
    4747    DynLib* DynLibManager::load( const std::string& filename)
    4848    {
    49                 DynLibList::iterator i = mLibList.find(filename);
    50                 if (i != mLibList.end())
    51                 {
    52                         return i->second;
    53                 }
    54                 else
    55                 {
    56                 DynLib* pLib = new DynLib(filename);
    57                         pLib->load();
    58                 mLibList[filename] = pLib;
    59                 return pLib;
    60                 }
     49        DynLibList::iterator i = mLibList.find(filename);
     50        if (i != mLibList.end())
     51        {
     52            return i->second;
     53        }
     54        else
     55        {
     56            DynLib* pLib = new DynLib(filename);
     57            pLib->load();
     58            mLibList[filename] = pLib;
     59            return pLib;
     60        }
    6161    }
    62         //-----------------------------------------------------------------------
    63         void DynLibManager::unload(DynLib* lib)
    64         {
    65                 DynLibList::iterator i = mLibList.find(lib->getName());
    66                 if (i != mLibList.end())
    67                 {
    68                         mLibList.erase(i);
    69                 }
    70                 lib->unload();
    71                 delete lib;
    72         }
    73         //-----------------------------------------------------------------------
     62    //-----------------------------------------------------------------------
     63    void DynLibManager::unload(DynLib* lib)
     64    {
     65        DynLibList::iterator i = mLibList.find(lib->getName());
     66        if (i != mLibList.end())
     67        {
     68            mLibList.erase(i);
     69        }
     70        lib->unload();
     71        delete lib;
     72    }
     73    //-----------------------------------------------------------------------
    7474    DynLibManager::~DynLibManager()
    7575    {
  • code/trunk/src/libraries/network/FunctionCallManager.cc

    r5781 r6073  
    4343    FunctionCallManager::clientMap_[clientID]->setClientID(clientID);
    4444  }
    45   FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID);
     45  FunctionCallManager::clientMap_[clientID]->addCallStatic(functionID);
    4646}
    4747void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1)
  • code/trunk/src/libraries/network/FunctionCallManager.h

    r5781 r6073  
    3737namespace orxonox {
    3838/**
    39         @author
     39    @author
    4040*/
    4141
  • code/trunk/src/libraries/network/GamestateHandler.h

    r5781 r6073  
    3535
    3636/**
    37         @author Oliver Scheuss
     37    @author Oliver Scheuss
    3838*/
    3939class _NetworkExport GamestateHandler{
  • code/trunk/src/libraries/network/Host.h

    r5961 r6073  
    4545*       - defines static functions available on both server and client
    4646*       - is the interface to be used when communicating with the network
    47 *       @author Oliver Scheuss
     47*       @author Oliver Scheuss
    4848*/
    4949class _NetworkExport Host{
  • code/trunk/src/libraries/network/TrafficControl.cc

    r5781 r6073  
    6464*Initializing protected members
    6565*/
    66         TrafficControl *TrafficControl::instance_=0;
    67 
    68         /**
    69         * @brief Constructor: assures that only one reference will be created and sets the pointer
    70         */
    71         TrafficControl::TrafficControl()
    72         {
     66    TrafficControl *TrafficControl::instance_=0;
     67
     68    /**
     69    * @brief Constructor: assures that only one reference will be created and sets the pointer
     70    */
     71    TrafficControl::TrafficControl()
     72    {
    7373    RegisterObject(TrafficControl);
    74           assert(instance_==0);
    75           instance_=this;
     74      assert(instance_==0);
     75      instance_=this;
    7676    this->setConfigValues();
    77         }
    78 
    79         /**
    80         * @brief Destructor: resets the instance pointer to 0
    81         */
    82         TrafficControl::~TrafficControl()
    83         {
    84           instance_=0;
    85         }
     77    }
     78
     79    /**
     80    * @brief Destructor: resets the instance pointer to 0
     81    */
     82    TrafficControl::~TrafficControl()
     83    {
     84      instance_=0;
     85    }
    8686
    8787/**
     
    121121
    122122
    123         void TrafficControl::processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj>& list)
    124         {
    125           currentClientID=clientID;
    126           currentGamestateID=gamestateID;
    127           evaluateList(clientID, list);
    128           return;
    129         }
     123    void TrafficControl::processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj>& list)
     124    {
     125      currentClientID=clientID;
     126      currentGamestateID=gamestateID;
     127      evaluateList(clientID, list);
     128      return;
     129    }
    130130
    131131  TrafficControl *TrafficControl::getInstance()
     
    135135  }
    136136
    137         void TrafficControl::ack(unsigned int clientID, unsigned int gamestateID)
    138         {
     137    void TrafficControl::ack(unsigned int clientID, unsigned int gamestateID)
     138    {
    139139    if ( !this->bActive_ )
    140140      return;
    141           std::list<obj>::iterator itvec;  // iterator to iterate through the acked objects
     141      std::list<obj>::iterator itvec;  // iterator to iterate through the acked objects
    142142
    143143    //assertions to make sure the maps already exist
     
    151151
    152152    for(itvec = objectListTemp[gamestateID].begin(); itvec != objectListTemp[gamestateID].end(); itvec++)
    153           {
     153      {
    154154      if(objectListPerm.find((*itvec).objID) != objectListPerm.end()) // check whether the obj already exists in our lists
    155155      {
     
    165165        objectListPerm[(*itvec).objID].objSize = (*itvec).objSize;
    166166      }
    167           }
    168            // remove temporary list (with acked objects) from the map
     167      }
     168       // remove temporary list (with acked objects) from the map
    169169    objectListTemp.erase( objectListTemp.find(gamestateID) );
    170         }
     170    }
    171171
    172172/**
     
    174174*/
    175175
    176         /**
    177         *updateClientListPerm
    178         *returns void
    179         */
    180         void TrafficControl::insertinClientListPerm(unsigned int clientID, obj objinf)
    181         {
    182           std::map<unsigned int,std::map<unsigned int, objInfo> >::iterator itperm;//iterator clientListPerm over clientIDs
     176    /**
     177    *updateClientListPerm
     178    *returns void
     179    */
     180    void TrafficControl::insertinClientListPerm(unsigned int clientID, obj objinf)
     181    {
     182      std::map<unsigned int,std::map<unsigned int, objInfo> >::iterator itperm;//iterator clientListPerm over clientIDs
    183183    unsigned int gsid=GAMESTATEID_INITIAL, gsdiff=currentGamestateID, prioperm=Synchronisable::getSynchronisable(objinf.objID)->getPriority(), priomom=0;
    184184    clientListPerm_[clientID][objinf.objID] = objInfo(objinf.objID, objinf.objCreatorID,gsid,gsdiff, objinf.objSize,prioperm,priomom);
    185         }
     185    }
    186186
    187187  /**
     
    223223
    224224
    225         /**
    226         *evaluateList evaluates whether new obj are there, whether there are things to be updatet and manipulates all this.
    227         */
    228         void TrafficControl::evaluateList(unsigned int clientID, std::list<obj>& list)
    229         {
     225    /**
     226    *evaluateList evaluates whether new obj are there, whether there are things to be updatet and manipulates all this.
     227    */
     228    void TrafficControl::evaluateList(unsigned int clientID, std::list<obj>& list)
     229    {
    230230
    231231    if( bActive_ )
  • code/trunk/src/libraries/network/TrafficControl.h

    r5781 r6073  
    130130    static void processAck(unsigned int clientID, unsigned int gamestateID)
    131131    { return instance_->ack(clientID, gamestateID); }
    132     void deleteObject(unsigned int objectID);                           // this function gets called when an object has been deleted (in order to clean up lists and maps)
     132    void deleteObject(unsigned int objectID);               // this function gets called when an object has been deleted (in order to clean up lists and maps)
    133133   
    134134    bool prioritySort(uint32_t clientID, obj i, obj j);
  • code/trunk/src/libraries/network/packet/Acknowledgement.h

    r5781 r6073  
    3737namespace packet {
    3838/**
    39         @author
     39    @author
    4040*/
    4141class _NetworkExport Acknowledgement : public Packet
  • code/trunk/src/libraries/network/packet/Chat.h

    r5781 r6073  
    3636namespace packet {
    3737/**
    38         @author
     38    @author
    3939*/
    4040class _NetworkExport Chat : public Packet
  • code/trunk/src/libraries/network/packet/ClassID.h

    r5781 r6073  
    3838 
    3939/**
    40         @author
     40    @author
    4141*/
    4242class _NetworkExport ClassID : public Packet
  • code/trunk/src/libraries/network/packet/DeleteObjects.h

    r5781 r6073  
    3535namespace packet {
    3636/**
    37         @author
     37    @author
    3838*/
    3939class _NetworkExport DeleteObjects : public Packet
  • code/trunk/src/libraries/network/packet/FunctionCalls.h

    r5781 r6073  
    4040namespace packet {
    4141/**
    42         @author
     42    @author
    4343*/
    4444
  • code/trunk/src/libraries/network/packet/FunctionIDs.h

    r5781 r6073  
    3838 
    3939/**
    40         @author
     40    @author
    4141*/
    4242class _NetworkExport FunctionIDs : public Packet
  • code/trunk/src/libraries/network/packet/Gamestate.h

    r5781 r6073  
    9696
    9797/**
    98         @author Oliver Scheuss
     98    @author Oliver Scheuss
    9999*/
    100100class _NetworkExport Gamestate: public Packet{
  • code/trunk/src/libraries/network/packet/Packet.h

    r5781 r6073  
    5757
    5858/**
    59         @author Oliver Scheuss <scheusso [at] ee.ethz.ch>
     59    @author Oliver Scheuss <scheusso [at] ee.ethz.ch>
    6060*/
    6161class _NetworkExport Packet{
  • code/trunk/src/libraries/network/packet/Welcome.h

    r5781 r6073  
    3636
    3737/**
    38         @author
     38    @author
    3939*/
    4040class _NetworkExport Welcome : public Packet
  • code/trunk/src/libraries/network/synchronisable/NetworkCallback.h

    r5781 r6073  
    4949    public:
    5050      NetworkCallback(T* object, void (T::*function) (void)) : object_(object), function_(function) {}
    51           virtual ~NetworkCallback() {}
     51      virtual ~NetworkCallback() {}
    5252      virtual void call()
    5353        { (this->object_->*function_)(); }
Note: See TracChangeset for help on using the changeset viewer.