Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5690 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Nov 22, 2005, 12:15:36 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: parameters of Executor are const void* instead of const char*

Location:
trunk/src/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl_gui/glgui_widget.cc

    r5406 r5690  
    7676 * @param signal the name of the Signal
    7777 */
    78 void GLGuiWidget::connectSignal(GLGuiSignalType signalType, Signal* signal)
     78void GLGuiWidget::connectSignal(GLGuiSignalType signalType, const Executor& signal)
    7979{
    80   if (signal == NULL || signalType >= GLGuiSignalCount)
     80  if (signalType >= GLGuiSignalCount)
    8181    return;
    8282
     
    8484    PRINTF(2)("Already connected a Signal to %s (%s) type %s... overwriting\n");
    8585
    86   this->widgetSignals[signalType] = signal;
     86  this->widgetSignals[signalType] = signal.clone();
    8787}
    8888
  • trunk/src/lib/gui/gl_gui/glgui_widget.h

    r5456 r5690  
    88
    99#include "element_2d.h"
     10#include "event.h"
     11
    1012#include "glincl.h"
    11 #include "event.h"
     13#include "executor/executor.h"
    1214
    1315// FORWARD DECLARATION
    1416class Material;
    15 class Signal; //!< @todo create this!!
    1617
    1718typedef enum
     
    4950    void hide() {};
    5051
    51     void connectSignal(GLGuiSignalType signalType, Signal* signal);
     52    void connectSignal(GLGuiSignalType signalType, const Executor& signal);
    5253    void disconnectSignal(GLGuiSignalType signalType);
    5354    bool focusOverWidget(float x, float y);
     
    7172
    7273  private:
    73     Signal*               widgetSignals[GLGuiSignalCount];
     74    Executor*             widgetSignals[GLGuiSignalCount];
    7475
    7576    bool                  focusable;        //!< If this widget can receive focus.
  • trunk/src/lib/shell/shell_command.h

    r5642 r5690  
    99#include "base_object.h"
    1010
    11 #include "helper_functions.h"
    12 #include "multi_type.h"
    13 #include "substring.h"
    14 #include "functor_list.h"
    1511#include "executor/executor.h"
    1612#include <stdarg.h>
  • trunk/src/lib/util/executor/executor.h

    r5656 r5690  
    4242
    4343    /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */
    44     virtual void execute (BaseObject* object, const char* parameters) = 0;
     44    virtual void execute (BaseObject* object, const void* parameters) = 0;
    4545
    4646    /** @returns the Type of this Function (either static or objective) */
     
    185185#define ExecutorExecute1(t1) \
    186186   else if (this->paramCount == 1 && this->defaultValue[0].getType() == t1##_PARAM) \
    187     EXECUTOREXECUTER(_1_##t1)(t1##_FUNC(parameters, t1##_DEFGRAB(0)))
     187    EXECUTOREXECUTER(_1_##t1)(t1##_FUNC((const char*)parameters, t1##_DEFGRAB(0)))
    188188
    189189//! execute-macro for functions with two parameters
     
    261261    } fp;
    262262
    263     virtual void execute (BaseObject* object, const char* parameters)
     263    virtual void execute (BaseObject* object, const void* parameters)
    264264    {
    265       SubString sub(parameters, " \n\t,", '\\');
     265      SubString sub((const char*) parameters, " \n\t,", '\\');
    266266//! FUNCTOR_LIST is the List of Executive Functions
    267267#define FUNCTOR_LIST(x) ExecutorExecute ## x
     
    323323
    324324
    325     virtual void execute (BaseObject* object, const char* parameters)
     325    virtual void execute (BaseObject* object, const void* parameters)
    326326    {
    327   SubString sub(parameters, " \n\t,");
     327  SubString sub((const char*)parameters, " \n\t,");
    328328//! FUNCTOR_LIST is the List of Executive Functions
    329329#define FUNCTOR_LIST(x) ExecutorExecute ## x
  • trunk/src/lib/util/executor/executor_specials.h

    r5659 r5690  
    5959     * @param loadString ignored in this case
    6060     */
    61     virtual void execute(BaseObject* object, const char* loadString)
     61    virtual void execute(BaseObject* object, const void* loadString)
    6262    {
    6363      if (object != NULL && this->element != NULL)
Note: See TracChangeset for help on using the changeset viewer.