Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4873 in orxonox.OLD for orxonox/trunk/src/lib/event/event_handler.cc


Ignore:
Timestamp:
Jul 15, 2005, 12:37:31 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: temporary fix in the EvenetHandler
EVENT_NUMBER is not a maximum value of events, but merely a count of how many differnent kinds of events there are
FIXME

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/event/event_handler.cc

    r4872 r4873  
    2424#include "compiler.h"
    2525#include "debug.h"
     26#include "class_list.h"
    2627
    2728using namespace std;
     
    4243  for(int i = 0; i < ES_NUMBER; ++i)
    4344    {
    44       for(int j = 0; j < SDLK_LAST; ++j)
     45      for(int j = 0; j < EV_NUMBER; ++j)
    4546        {
    4647          this->listeners[i][j] = NULL;
     
    277278      PRINT(4)("=  Got Event nr %i, for state %i", ev.type, this->state);
    278279
     280      //! @todo fix this debug code away */
     281      ////////////////////////////////////////////////////////////////
    279282      listener = this->listeners[this->state][ev.type];
     283      if (!ClassList::exists(listener, CL_EVENT_LISTENER) && listener != NULL)
     284      {
     285        ClassList::debug(3, CL_EVENT_LISTENER);
     286        this->debug();
     287        printf("ERROR THIS EVENT DOES NOT EXIST\n");
     288        return;
     289      }
     290      ////////////////////////////////////////////////////////////////
    280291      if( listener != NULL)
    281292        {
     
    304315      if( this->listeners[i][j] != NULL)
    305316      {
    306         PRINT(0)("Event %d of State %d subscribed to %s\n", j, i, this->listeners[i][j]->getName());
     317        PRINT(0)("Event %d of State %d subscribed to %s (%p)\n", j, i, this->listeners[i][j]->getName(), this->listeners[i][j]);
    307318      }
    308319    }
Note: See TracChangeset for help on using the changeset viewer.