Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4594 in orxonox.OLD for orxonox/trunk/src/lib/lang/base_object.cc


Ignore:
Timestamp:
Jun 10, 2005, 7:52:04 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: isA should work now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/lang/base_object.cc

    r4592 r4594  
    115115bool BaseObject::isA (ClassID classID)
    116116{
    117   if( this->classID & classID)
    118     return true;
     117  // if classID is a derivable object
     118  if (classID & CL_MASK_SUPER_CLASS || classID & CL_MASK_SUBSUPER_CLASS)
     119  {
     120    if( this->classID & classID)
     121      return true;
     122  }
     123  // if classID is a LOWLEVEL-class
     124  else
     125  {
     126    if ((this->classID & CL_MASK_LOWLEVEL_CLASS) == classID)
     127      return true;
     128  }
    119129  return false;
    120130}
     
    126136{
    127137  PRINT(0)("object %s: ", this->getName() );
    128   if (this->classID & CL_MASK_SUPERCLASS)
     138  if (this->classID & CL_MASK_SUPER_CLASS)
    129139  {
    130140    PRINT(0)("is a derived Class from: \n");
Note: See TracChangeset for help on using the changeset viewer.