Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Aug 27, 2005, 12:17:50 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: one Parameter safe now

File:
1 edited

Legend:

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

    r5147 r5148  
    4545  }
    4646
    47 
     47// CONSTRUCTORS
    4848#define ShellCommandConstructor0 \
    4949  void (T::*functionPointer_0)(); \
     
    7070#define ShellCommandExecute1(t1) \
    7171   else if (this->paramCount == 1 && this->parameters[0] == t1##_PARAM) \
    72        (dynamic_cast<T*>(object)->*functionPointer_1_##t1)(t1##_FUNC(parameters, 0))
     72    (dynamic_cast<T*>(object)->*functionPointer_1_##t1)(t1##_FUNC(parameters, 0))
    7373
    7474
     
    9090
    9191    static bool isRegistered(const char* commandName, ClassID classID, unsigned int paramCount, ...);
     92    static const char* paramToString(long parameter);
    9293
     94    void debug();
    9395  private:
    9496    virtual void executeCommand (BaseObject* object, const char* parameters) = NULL;
     
    9799    void*                            functionPointer;     //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL )
    98100    unsigned int                     paramCount;          //!< the count of parameters
    99     long*                            parameters;          //!< Parameters
     101    unsigned int*                    parameters;          //!< Parameters
    100102    bool                             isSingleton;         //!< if the Class is Singleton @todo autocheck
    101103
     
    143145#define FUNCTOR_LIST(x) ShellCommandRegister ## x
    144146//#include "functor_list.h"
    145 FUNCTOR_LIST(0);
    146 FUNCTOR_LIST(1)(l_INT);
    147 FUNCTOR_LIST(1)(l_STRING);
     147  FUNCTOR_LIST(0);
     148  FUNCTOR_LIST(1)(l_INT);
     149  FUNCTOR_LIST(1)(l_STRING);
    148150#undef FUNCTOR_LIST
    149151
     
    160162    {
    161163      if (parameters != NULL)
    162         SubString params(parameters, ',');
     164        //SubString params(parameters, ',');
    163165#define FUNCTOR_LIST(x) ShellCommandExecute ## x
    164166//#include "functor_list.h"
    165167  FUNCTOR_LIST(0);
    166168  FUNCTOR_LIST(1)(l_INT);
    167   FUNCTOR_LIST(1)(l_STRING);
     169  //FUNCTOR_LIST(1)(l_STRING);
    168170#undef FUNCTOR_LIST
    169171    }
Note: See TracChangeset for help on using the changeset viewer.