Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Sep 18, 2005, 2:57:20 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: doxygen-tags

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

Legend:

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

    r5183 r5197  
    4242    void activate();
    4343    void deactivate();
     44    /** @returns true if the Shell is active, false otherwise. */
    4445    inline bool isActive() const { return this->bActive; };
    4546
     
    8283
    8384    // HANDLING TEXT INPUT
    84     ShellInput*              shellInput;
     85    ShellInput*              shellInput;             //!< The inputLine of the Shell.
    8586    // BUFFER
    8687    unsigned int             bufferDisplaySize;      //!< The Size of the Display-buffer, in lines (not in characters)
  • trunk/src/lib/shell/shell_command.cc

    r5196 r5197  
    6161}
    6262
     63/**
     64 * collects the Commands registered to some class.
     65 * @param className the name of the Class to collect the Commands from.
     66 * @param stringList a List to paste the Commands into.
     67 * @returns true on success, false otherwise
     68 */
    6369bool ShellCommandClass::getCommandListOfClass(const char* className, tList<const char>* stringList)
    6470{
     
    8894}
    8995
     96/**
     97 * collects the Aliases registered to the ShellCommands
     98 * @param stringList a List to paste the Aliases into.
     99 * @returns true on success, false otherwise
     100 */
    90101bool ShellCommandClass::getCommandListOfAlias(tList<const char>* stringList)
    91102{
     
    104115}
    105116
    106 
    107117/**
    108118 * unregisters all Commands that exist
     
    127137  if (ShellCommandClass::aliasList != NULL)
    128138  {
    129    tIterator<ShellCommandAlias>* itAL = ShellCommandClass::aliasList->getIterator();
    130    ShellCommandAlias* elemAL = itAL->firstElement();
    131    while(elemAL != NULL)
    132    {
    133      delete elemAL;
    134      elemAL = itAL->nextElement();
    135    }
    136    delete itAL;
    137    delete ShellCommandClass::aliasList;
    138    ShellCommandClass::aliasList = NULL;
    139   }
    140 }
    141 
     139    tIterator<ShellCommandAlias>* itAL = ShellCommandClass::aliasList->getIterator();
     140    ShellCommandAlias* elemAL = itAL->firstElement();
     141    while(elemAL != NULL)
     142    {
     143      delete elemAL;
     144      elemAL = itAL->nextElement();
     145    }
     146    delete itAL;
     147    delete ShellCommandClass::aliasList;
     148    ShellCommandClass::aliasList = NULL;
     149  }
     150}
     151
     152/**
     153 * checks if a Class is already registered to the Commands' class-stack
     154 * @param className the Name of the Class to check for
     155 * @returns the CommandClass if found, NULL otherwise
     156 */
    142157const ShellCommandClass* ShellCommandClass::isRegistered(const char* className)
    143158{
     
    468483}
    469484
     485/**
     486 * adds an Alias to this Command
     487 * @param alias the name of the Alias to set
     488 * @returns itself
     489 */
    470490ShellCommandBase* ShellCommandBase::setAlias(const char* alias)
    471491{
  • trunk/src/lib/shell/shell_command.h

    r5196 r5197  
    5151
    5252  public:
     53    /** @returns the CommandClassList */
    5354    static const tList<ShellCommandClass>* getCommandClassList() { return ShellCommandClass::commandClassList; };
    5455    static bool getCommandListOfClass(const char* className, tList<const char>* stringList);
     
    317318};
    318319
     320//! A Class, that handles aliases.
    319321class ShellCommandAlias
    320322{
    321323  friend class ShellCommandBase;
    322324  public:
     325    /** @returns the Name of the Alias. */
    323326    const char* getName() const { return this->aliasName; };
     327    /** @returns the Command, this Alias is asociated with */
    324328    ShellCommandBase* getCommand() const { return this->command; };
    325329
    326330  private:
     331    /** @param aliasName the name of the Alias @param command the Command, to associate this alias with */
    327332    ShellCommandAlias(const char* aliasName, ShellCommandBase* command) { this->aliasName = aliasName; this->command = command; };
    328333
    329334  private:
    330     const char*         aliasName;
    331     ShellCommandBase*   command;
     335    const char*         aliasName;       //!< the name of the Alias
     336    ShellCommandBase*   command;         //!< a pointer to the command, this alias executes.
    332337};
    333338
    334 
    335339#endif /* _SHELL_COMMAND_H */
  • trunk/src/lib/shell/shell_completion.cc

    r5195 r5197  
    202202 * completes a Function
    203203 * @param functionBegin the beginning of the function String
     204 * @param classID the class' ID to complete the function of
    204205 */
    205206bool ShellCompletion::functionComplete(const char* functionBegin, long classID)
     
    215216}
    216217
     218/**
     219 * completes an Alias
     220 * @param aliasBegin the beginning of the Alias-String to complete
     221 * @returns true on succes, false if something went wrong
     222 */
    217223bool ShellCompletion::aliasComplete(const char* aliasBegin)
    218224{
     
    352358}
    353359
    354 
     360/**
     361 * deletes the Completion List.
     362 *
     363 * This is done at the beginning of each completion-run
     364 */
    355365void ShellCompletion::emptyCompletionList()
    356366{
  • trunk/src/lib/shell/shell_completion.h

    r5195 r5197  
    1515#endif
    1616
     17//! an enumerator for different types the Shell can complete.
    1718typedef enum {
    1819  SHELLC_NONE        = 0,
     
    2324} SHELLC_TYPE;
    2425
     26//! A struct for ShellElements (these are used as containers to identify an Input for what it is)
    2527struct ShellC_Element{
    26   const char*     name;     //!<
    27   SHELLC_TYPE     type;
     28  const char*     name;     //!< the Name of the Element to be completed.
     29  SHELLC_TYPE     type;     //!< the type of the Element
    2830};
    2931
     
    3739  bool autoComplete(ShellInput* input = NULL);
    3840  bool classComplete(const char* classBegin);
    39   long classMatch(const char* input, unsigned int* length);
     41//  long classMatch(const char* input, unsigned int* length);
    4042  bool objectComplete(const char* objectBegin, long classID);
    41   bool objectMatch(const char* objectBegin, long classID, unsigned int* length);
     43//  bool objectMatch(const char* objectBegin, long classID, unsigned int* length);
    4244  bool functionComplete(const char* functionBegin, long classID);
    43   bool functionMatch(const char* functionBegin, long classID, unsigned int* length);
     45//  bool functionMatch(const char* functionBegin, long classID, unsigned int* length);
    4446  bool aliasComplete(const char* aliasBegin);
    4547
     
    5254 private:
    5355   tList<ShellC_Element>*   completionList;          //!< A list of completions, that are io.
    54    ShellInput*              input;
     56   ShellInput*              input;                   //!< the input this completion works on.
    5557};
    5658
  • trunk/src/lib/shell/shell_input.cc

    r5184 r5197  
    182182}
    183183
     184/**
     185 * ticks the ShellInput
     186 * @param dt the time passed since the last update
     187 */
    184188void ShellInput::tick(float dt)
    185189{
Note: See TracChangeset for help on using the changeset viewer.