Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5137 in orxonox.OLD for trunk/src/util/shell_command.h


Ignore:
Timestamp:
Aug 26, 2005, 1:41:54 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: better macro-definition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/shell_command.h

    r5136 r5137  
    6262    static bool isRegistered(const char* commandName, ClassID classID, unsigned int paramCount, ...);
    6363
    64 
    6564  protected:
    6665    void*                            functionPointer;     //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL )
     
    103102    static void unregisterCommand(const char* commandNaame, ClassID classID);
    104103
    105     static void registerCommand(const char* commandName, ClassID classID, void (T::*functionPointer)(), bool isSingleton = false)
     104    static void registerCommand(const char* commandName, ClassID classID, void (T::*functionPointer)())
    106105    {
    107106      if (isRegistered(commandName, classID, 0)== true)
     
    109108      else
    110109      {
    111         if (isSingleton == false)
     110        if (classID & CL_MASK_SINGLETON == CL_MASK_SINGLETON)
     111          new ShellCommandSingleton<T>(commandName, classID, functionPointer);
     112        else
    112113          new ShellCommand<T>(commandName, classID, functionPointer);
    113         else
    114           new ShellCommandSingleton<T>(commandName, classID, functionPointer);
    115114      }
    116115    }
Note: See TracChangeset for help on using the changeset viewer.