Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7372 in orxonox.OLD for trunk/src/lib/shell/shell_completion.h


Ignore:
Timestamp:
Apr 26, 2006, 2:23:53 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: Typenames as std::string better now

File:
1 edited

Legend:

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

    r7371 r7372  
    2626  //! an enumerator for different types the Shell can complete.
    2727  typedef enum {
    28     SHELLC_NONE        = 0,
    29     SHELLC_CLASS       = 1,
    30     SHELLC_OBJECT      = 2,
    31     SHELLC_FUNCTION    = 4,
    32     SHELLC_ALIAS       = 8,
    33   } SHELLC_TYPE;
     28    NullCompletion         = 0,
     29    ClassCompletion        = 1,
     30    ObjectCompletion       = 2,
     31    FunctionCompletion     = 4,
     32    AliasCompletion        = 8,
     33  } CompletionType;
    3434
    3535//! A struct for ShellElements (these are used as containers to identify an Input for what it is)
    36   struct ShellC_Element{
     36  struct CompletionElement{
    3737    std::string     name;     //!< the Name of the Element to be completed.
    38     SHELLC_TYPE    type;     //!< the type of the Element
     38    CompletionType type;     //!< the type of the Element
    3939  };
    4040
     
    5757
    5858
    59   bool addToCompleteList(const std::list<std::string>& inputList, const std::string& completionBegin, SHELLC_TYPE type);
    60   bool addToCompleteList(const std::list<BaseObject*>& inputList, const std::string& completionBegin, SHELLC_TYPE type);
     59  bool addToCompleteList(const std::list<std::string>& inputList, const std::string& completionBegin, ShellCompletion::CompletionType type);
     60  bool addToCompleteList(const std::list<BaseObject*>& inputList, const std::string& completionBegin, ShellCompletion::CompletionType type);
    6161  void clearCompletionList();
    6262
    63   static const char* ShellCompletion::typeToString(SHELLC_TYPE type);
     63  static const std::string& ShellCompletion::typeToString(ShellCompletion::CompletionType type);
    6464
    6565 private:
    66    std::list<ShellC_Element>    completionList;          //!< A list of completions, that are io.
     66   std::list<CompletionElement>    completionList;          //!< A list of completions, that are io.
     67
     68
     69   static const std::string        typeNames[];             //!< A list of Completion-Type-Names.
    6770};
    6871
Note: See TracChangeset for help on using the changeset viewer.