Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 26, 2008, 8:30:33 PM (16 years ago)
Author:
landauf
Message:

I start to like it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/ArgumentCompletionFunctions.h

    r1416 r1430  
    3333#include <string>
    3434
     35#include "ArgumentCompleter.h"
     36#include "CorePrereqs.h"
     37
     38
     39#define ARGUMENT_COMPLETION_FUNCTION_DECLARATION(functionname) \
     40    ArgumentCompleter* functionname(); \
     41    _CoreExport std::list<std::pair<std::string, std::string> > acf_##functionname
     42
     43#define ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(functionname) \
     44    ArgumentCompleter* functionname() \
     45    { \
     46        static ArgumentCompleter completer = ArgumentCompleter(&acf_##functionname); \
     47        return &completer; \
     48    } \
     49    \
     50    std::list<std::pair<std::string, std::string> > acf_##functionname
     51
    3552namespace orxonox
    3653{
    3754    namespace autocompletion
    3855    {
    39         std::list<std::pair<std::string, std::string> > fallback();
     56        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(fallback)();
    4057    }
    4158}
Note: See TracChangeset for help on using the changeset viewer.