Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5652 in orxonox.OLD for trunk/src/lib/util/executor


Ignore:
Timestamp:
Nov 20, 2005, 6:32:39 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: new LoadParam procedure with all NON-cycling load-options, and it works perfectly (on first sight :))

now going to make the same for cycling LoadOptions

Location:
trunk/src/lib/util/executor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/executor/executor.h

    r5642 r5652  
    2121//! an enumerator for the definition of the Type.
    2222typedef enum {
    23   Executor_Objective   = 1,
    24   Executor_Static      = 2,
     23  Executor_Objective         = 0x00000001,
     24  Executor_Static            = 0x00000002,
     25
     26  Executor_NoLoadString      = 0x00000010,
    2527} Executor_Type;
    2628
     
    4345
    4446    /** @returns the Type of this Function (either static or objective) */
    45     inline Executor_Type getType() const { return this->functorType; };
     47    inline long getType() const { return this->functorType; };
    4648    /** @returns the Count of Parameters this Executor takes */
    4749    inline unsigned int getParamCount() const { return this->paramCount; };
     
    5658
    5759  protected:
    58     Executor_Type                    functorType;      //!< The type of Function we've got (either static or objective).
    59     unsigned int                     paramCount;       //!< the count of parameters.
    60     MultiType*                       defaultValue;     //!< Default Values.
     60    long                        functorType;      //!< The type of Function we've got (either static or objective).
     61    unsigned int                paramCount;       //!< the count of parameters.
     62    MultiType*                  defaultValue;     //!< Default Values.
    6163};
    6264
     
    196198#define ExecutorExecute4(t1,t2,t3,t4) \
    197199   else if (this->paramCount == 4 && this->defaultValue[0].getType() == t1##_PARAM && this->defaultValue[1].getType() == t2##_PARAM && this->defaultValue[2].getType() == t3##_PARAM && this->defaultValue[3].getType() == t4##_PARAM) \
    198     EXECUTOREXECUTER(_4_##t1##_##t2##_##t3##_##t4)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3)))
     200    EXECUTOREXECUTER(_4_##t1##_##t2##_##t3##_##t4)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3))) \
     201
    199202
    200203//! execute-macro for functions with five parameters
     
    258261    virtual void execute (BaseObject* object, const char* parameters)
    259262    {
    260       SubString sub(parameters, true);
     263      SubString sub(parameters, ',');  /// FIXME ///
    261264//! FUNCTOR_LIST is the List of Executive Functions
    262265#define FUNCTOR_LIST(x) ExecutorExecute ## x
  • trunk/src/lib/util/executor/executor_specials.h

    r5651 r5652  
    3838
    3939      this->functionPointer = function;
     40      this->functorType = Executor_Objective | Executor_NoLoadString;
    4041    }
    4142
     
    6667  private:
    6768    /**
    68      * used for the copy-constructor
     69     * used for the copy-(Clone)-constructor
    6970     */
    7071    ExecutorXML() : Executor() { };
Note: See TracChangeset for help on using the changeset viewer.