Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4950 in orxonox.OLD for orxonox/trunk/src/util/fast_factory.cc


Ignore:
Timestamp:
Jul 24, 2005, 12:36:58 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: more loadability functionality in Weapon and FastFactory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/fast_factory.cc

    r4941 r4950  
    1818#include "compiler.h"
    1919#include "debug.h"
     20#include "string.h"
    2021
    2122using namespace std;
     
    8384/**
    8485 * searches for a FastFactory
    85  * @param factoryName the Name of the Factory to search for (not used)
    8686 * @param classID the ClassID of the FastFactory to search for
    8787 * @returns true if found, false otherwise.
    8888 */
    89 FastFactory* FastFactory::searchFastFactory(ClassID classID, const char* fastFactoryName)
     89FastFactory* FastFactory::searchFastFactory(ClassID classID)
    9090{
    9191  if (FastFactory::first == NULL)
     
    9797    {
    9898      if (tmpFac->storedClassID == classID)
     99        return tmpFac;
     100      tmpFac = tmpFac->next;
     101    }
     102  }
     103  return NULL;
     104}
     105
     106/**
     107 * searches for a FastFactory
     108 * @param classID the ClassID of the FastFactory to search for
     109 * @returns true if found, false otherwise.
     110 */
     111FastFactory* FastFactory::searchFastFactory(const char* fastFactoryName)
     112{
     113  if (FastFactory::first == NULL)
     114    return NULL;
     115  else
     116  {
     117    FastFactory* tmpFac = FastFactory::first;
     118    while (tmpFac != NULL)
     119    {
     120      if (strcmp(tmpFac->getName(), fastFactoryName))
    99121        return tmpFac;
    100122      tmpFac = tmpFac->next;
Note: See TracChangeset for help on using the changeset viewer.