Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 7, 2006, 3:25:04 PM (18 years ago)
Author:
snellen
Message:

scriptengine integrated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/lang/class_list.cc

    r7429 r8197  
    221221          return (*bo);
    222222    }
     223  }
     224  return NULL;
     225}
     226
     227
     228/**
     229 * @brief checks if the BaseObject* object exists.
     230 * @param objectName the name of the BaseObject to look for
     231 * @param classID if not CL_NULL it will only search through a specific type of Objects. Otherwise it will be searched everywhere.
     232 * @return true, if the Object Exists in the specified ClassID, false otherwise
     233 * @todo: speed this up!!
     234 */
     235BaseObject* ClassList::getObject(const std::string& objectName, const std::string& className)
     236{
     237  ClassList* cl = ClassList::getClassList(className);
     238  if (cl != NULL)
     239  {
     240    std::list<BaseObject*>::iterator bo;
     241    for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++)
     242      if ((*bo)->getName() != NULL && objectName == (*bo)->getName())
     243        return (*bo);
    223244  }
    224245  return NULL;
Note: See TracChangeset for help on using the changeset viewer.