Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7198 in orxonox.OLD for trunk/src/lib/shell


Ignore:
Timestamp:
Mar 8, 2006, 2:30:19 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: new Default Values… they now too are in MultiType instead of (count, …) or (count, va_arg) style

Location:
trunk/src/lib/shell
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell.cc

    r6780 r7198  
    4343SHELL_COMMAND(textsize, Shell, setTextSize)
    4444    ->describe("Sets the size of the Text size, linespacing")
    45     ->defaultValues(1, 15, 0);
     45    ->defaultValues(15, 0);
    4646SHELL_COMMAND(textcolor, Shell, setTextColor)
    4747    ->describe("Sets the Color of the Shells Text (red, green, blue, alpha)")
    48     ->defaultValues(4, SHELL_DEFAULT_TEXT_COLOR);
     48    ->defaultValues(SHELL_DEFAULT_TEXT_COLOR);
    4949SHELL_COMMAND(backgroundcolor, Shell, setBackgroundColor)
    5050    ->describe("Sets the Color of the Shells Background (red, green, blue, alpha)")
    51     ->defaultValues(4, SHELL_DEFAULT_BACKGROUND_COLOR);
     51    ->defaultValues(SHELL_DEFAULT_BACKGROUND_COLOR);
    5252SHELL_COMMAND(backgroundimage, Shell, setBackgroundImage)
    5353    ->describe("sets the background image to load for the Shell");
    5454SHELL_COMMAND(font, Shell, setFont)
    5555    ->describe("Sets the font of the Shell")
    56     ->defaultValues(1, SHELL_DEFAULT_FONT);
     56    ->defaultValues(SHELL_DEFAULT_FONT);
    5757
    5858/**
  • trunk/src/lib/shell/shell_command.cc

    r6222 r7198  
    292292
    293293/**
    294  * sets default Values of the Commands
    295  * @param count how many default Values to set.
    296  * @param ... the default Values in order. They will be cast to the right type
    297  * @returns itself
    298  *
    299  * Be aware, that when you use this Function, you !!MUST!! match the input as
    300  * count, [EXACTLY THE SAME AS IF YOU WOULD CALL THE FUNCTION UP TO count ARGUMENTS]
    301  */
    302 ShellCommand* ShellCommand::defaultValues(unsigned int count, ...)
     294 * @brief set the default values of the executor
     295 * @param value0 the first default value
     296 * @param value1 the second default value
     297 * @param value2 the third default value
     298 * @param value3 the fourth default value
     299 * @param value4 the fifth default value
     300 */
     301ShellCommand* ShellCommand::defaultValues(const MultiType& value0, const MultiType& value1,
     302                                          const MultiType& value2, const MultiType& value3,
     303                                          const MultiType& value4)
    303304{
    304305  if (this == NULL)
    305306    return NULL;
    306307
    307   va_list values;
    308   va_start(values, count);
    309 
    310   this->executor->defaultValues(count, values);
     308  this->executor->defaultValues(value0, value1, value2, value3, value4);
    311309
    312310  return this;
  • trunk/src/lib/shell/shell_command.h

    r5784 r7198  
    6565    ShellCommand* describe(const char* description);
    6666    ShellCommand* setAlias(const char* alias);
    67     ShellCommand* defaultValues(unsigned int count, ...);
     67    ShellCommand* defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
     68                                const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
     69                                const MultiType& value4 = MT_NULL);
    6870
    6971    static ShellCommand* registerCommand(const char* commandName, const char* className, const Executor& executor);
Note: See TracChangeset for help on using the changeset viewer.