Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5165 in orxonox.OLD for trunk


Ignore:
Timestamp:
Sep 6, 2005, 1:04:48 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: commands now get unregistered when leaving orxonox

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/orxonox.kdevelop

    r5161 r5165  
    1010    <projectdirectory>.</projectdirectory>
    1111    <absoluteprojectpath>false</absoluteprojectpath>
    12     <description></description>
     12    <description/>
    1313    <secondaryLanguages>
    1414      <language>C</language>
     
    2121      <directoryradio>build</directoryradio>
    2222      <customdirectory>/</customdirectory>
    23       <programargs></programargs>
     23      <programargs/>
    2424      <terminal>false</terminal>
    2525      <autocompile>true</autocompile>
     
    2828    <build>
    2929      <buildtool>make</buildtool>
    30       <builddir></builddir>
     30      <builddir/>
    3131    </build>
    3232    <make>
     
    3535      <prio>0</prio>
    3636      <dontact>false</dontact>
    37       <makebin></makebin>
    38       <makeoptions></makeoptions>
     37      <makebin/>
     38      <makeoptions/>
    3939      <selectedenvironment>default</selectedenvironment>
    4040      <environments>
    4141        <default/>
    4242      </environments>
    43       <defaulttarget></defaulttarget>
     43      <defaulttarget/>
    4444    </make>
    4545  </kdevcustomproject>
    4646  <kdevdebugger>
    4747    <general>
    48       <dbgshell></dbgshell>
    49       <programargs></programargs>
    50       <gdbpath></gdbpath>
    51       <configGdbScript></configGdbScript>
    52       <runShellScript></runShellScript>
    53       <runGdbScript></runGdbScript>
     48      <dbgshell/>
     49      <programargs/>
     50      <gdbpath/>
     51      <configGdbScript/>
     52      <runShellScript/>
     53      <runGdbScript/>
    5454      <breakonloadinglibs>true</breakonloadinglibs>
    5555      <separatetty>false</separatetty>
     
    131131    </codecompletion>
    132132    <creategettersetter>
    133       <prefixGet></prefixGet>
     133      <prefixGet/>
    134134      <prefixSet>set</prefixSet>
    135135      <prefixVariable>m_,_</prefixVariable>
  • trunk/src/lib/shell/shell_command.cc

    r5164 r5165  
    8686{
    8787  delete[] this->parameters;
     88}
     89
     90void ShellCommandBase::unregisterAllCommands()
     91{
     92  tIterator<ShellCommandBase>* iterator = ShellCommandBase::commandList->getIterator();
     93  ShellCommandBase* elem = iterator->firstElement();
     94  while(elem != NULL)
     95  {
     96    delete elem;
     97
     98    elem = iterator->nextElement();
     99  }
     100  delete iterator;
     101
     102  delete ShellCommandBase::commandList;
     103  ShellCommandBase::commandList = NULL;
     104}
     105
     106
     107void unregisterCommand(const char* commandName, const char* className)
     108{
     109  PRINTF(1)("IMPLEMENT THIS\n");
    88110}
    89111
     
    223245  if (this == NULL)
    224246    return NULL;
    225 
    226   this->description = description;
    227   return this;
    228 }
    229 
     247 else
     248 {
     249   this->description = description;
     250   return this;
     251 }
     252}
    230253
    231254void ShellCommandBase::debugDyn()
  • trunk/src/lib/shell/shell_command.h

    r5164 r5165  
    3939    static const tList<ShellCommandBase>* getCommandList() { return ShellCommandBase::commandList; };
    4040
    41 //    static void unregisterCommand(const char* commandNaame, const char* className);
     41    static void unregisterAllCommands();
     42    static void unregisterCommand(const char* commandNaame, const char* className);
    4243
    4344    static void debug();
  • trunk/src/orxonox.cc

    r5158 r5165  
    3131#include "world.h"
    3232#include "ini_parser.h"
    33 #include "game_loader.h"               
     33#include "game_loader.h"
    3434
    3535//ENGINES
     
    5050#include "substring.h"
    5151#include "shell.h"
     52#include "shell_command.h"
    5253
    5354#include <string.h>
     
    9192  delete GarbageCollector::getInstance();
    9293  FastFactory::deleteAll();
     94  ShellCommandBase::unregisterAllCommands();
    9395
    9496  delete EventHandler::getInstance();
Note: See TracChangeset for help on using the changeset viewer.