Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3468 in orxonox.OLD for orxonox/branches


Ignore:
Timestamp:
Mar 9, 2005, 11:05:53 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/trackManager: nicer output of the debug-method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/trackManager/src/track_manager.cc

    r3463 r3468  
    608608void TrackManager::debug(unsigned int level) const
    609609{
    610   printf("::CLASS TRACKMANAGER::debug information::\n");
    611   //  printf("Status is: %
    612   printf(" Consists of %d elements\n", this->trackElemCount);
    613   printf(" localTime is: %f\n", this->localTime);
     610  PRINT(0)("=========================================\n");
     611  PRINT(0)("= CLASS TRACKMANAGER::debug information =\n");
     612  PRINT(0)("=========================================\n");
     613  //  PRINT(0)("Status is: %
     614  PRINT(0)(" Consists of %d elements\n", this->trackElemCount);
     615  PRINT(0)(" localTime is: %f\n", this->localTime);
    614616  if (level >= 2)
    615617    {
     
    617619        {
    618620          TrackElement* tmpElem = this->findTrackElementByID(i);
    619           printf("  ::TrackElement:%i::", tmpElem->ID);
     621          PRINT(0)("--== TrackElement:%i ==--", tmpElem->ID);
    620622          if(tmpElem->name)
    621             printf("name:%s::", tmpElem->name);
     623            PRINT(0)("Name: %s::", tmpElem->name);
    622624          if(tmpElem->isFresh)
    623             printf("   has not jet eddited in any way\n");
    624           printf("\n   TimeTable: startingTime=%f; endTime=%f; duration=%f; jumpTime=%f\n", tmpElem->startingTime, tmpElem->endTime, tmpElem->duration, tmpElem->jumpTime);
    625           printf("   consists of %d Points\n", tmpElem->nodeCount);
     625            PRINT(0)("  -- has not jet eddited in any way --\n");
     626          PRINT(0)("\n   TimeTable: startingTime=%f; endTime=%f; duration=%f; jumpTime=%f\n", tmpElem->startingTime, tmpElem->endTime, tmpElem->duration, tmpElem->jumpTime);
     627          PRINT(0)("   consists of %d Points\n", tmpElem->nodeCount);
    626628          if (tmpElem->childCount == 0)
    627             printf("   has no child\n");           
     629            PRINT(0)("   has no child\n");
    628630          else if (tmpElem->childCount == 1)
    629             printf("   has 1 child: ==%d==\n", tmpElem->children[0]->ID);
     631            PRINT(0)("   has 1 child: =%d=\n", tmpElem->children[0]->ID);
    630632          else if (tmpElem->childCount > 1)
    631633            {
    632               printf("   has %d children: ", tmpElem->childCount);
     634              PRINT(0)("   has %d children: ", tmpElem->childCount);
    633635              for(int i = 0; i < tmpElem->childCount; i++)
    634                 printf("=%d= ", tmpElem->children[i]->ID);
    635               printf("\n");
     636                PRINT(0)("=%d= ", tmpElem->children[i]->ID);
     637              PRINT(0)("\n");
    636638            }
    637639
    638640          if(tmpElem->isHotPoint)
    639             printf("   is a special Point:\n");
     641            PRINT(0)("   is a special Point:\n");
    640642          if(tmpElem->isSavePoint)
    641             printf("    is a SavePoint\n");
     643            PRINT(0)("    is a SavePoint\n");
    642644          if(tmpElem->isFork)
    643645            {
    644               printf("    is A Fork with with %d children.\n", tmpElem->childCount);
     646              PRINT(0)("    is A Fork with with %d children.\n", tmpElem->childCount);
    645647            }
    646648          if(tmpElem->isJoined)
    647             printf("   is Joined at the End\n");
     649            PRINT(0)("   is Joined at the End\n");
     650
     651          if(!tmpElem->backLoopCheck(tmpElem)) /* this should not happen */
     652            PRINT(2)(" THERE IS A BACKLOOP TO THIS ELEMENT\n");
    648653        }
    649654    }
    650 }
     655  PRINT(0)("-----------------------------------------\n");
     656}
Note: See TracChangeset for help on using the changeset viewer.