Orxonox  0.0.5 Codename: Arcturus
ArgumentCompletionFunctions.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Fabian 'x3n' Landau
24  * Co-authors:
25  * ...
26  *
27  */
28 
149 #ifndef _ArgumentCompletionFunctions_H__
150 #define _ArgumentCompletionFunctions_H__
151 
152 #include "core/CorePrereqs.h"
153 #include "ArgumentCompleter.h"
154 
162 #define ARGUMENT_COMPLETION_FUNCTION_DECLARATION(functionname) \
163  ArgumentCompleter* functionname(); \
164  ArgumentCompletionList acf_##functionname
165 
170 #define ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(functionname) \
171  _ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_INTERNAL(functionname, false)
172 
177 #define ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI(functionname) \
178  _ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_INTERNAL(functionname, true)
179 
181 #define _ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_INTERNAL(functionname, bUseMultipleWords) \
182  ArgumentCompleter* functionname() \
183  { \
184  static ArgumentCompleter completer = ArgumentCompleter(&acf_##functionname, bUseMultipleWords); \
185  return &completer; \
186  } \
187  \
188  ArgumentCompletionList acf_##functionname
189 
191 #define ARGUMENT_COMPLETION_FUNCTION_CALL(functionname) acf_##functionname
192 
193 
194 namespace orxonox
195 {
196  namespace autocompletion
197  {
208  }
209 }
210 
211 #endif /* _ArgumentCompletionFunctions_H__ */
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION() files(const std::string &fragment)
Returns possible files and directories and also supports files in arbitrary deeply nested subdirector...
Definition: ArgumentCompletionFunctions.cc:234
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION() settingsentries(const std::string &fragment, const std::string &section)
Returns the entries in a given section of the config file.
Definition: ArgumentCompletionFunctions.cc:292
Shared library macros, enums, constants and forward declarations for the core library ...
::std::string string
Definition: gtest-port.h:756
#define ARGUMENT_COMPLETION_FUNCTION_DECLARATION(functionname)
Used to declare an argument completion function with name functionname.
Definition: ArgumentCompletionFunctions.h:162
Definition of the orxonox::ArgumentCompleter class that is used to execute argument completion functi...
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION() settingsvalue(const std::string &fragment, const std::string &entry, const std::string &section)
Returns the current value of a given value in a given section of the config file. ...
Definition: ArgumentCompletionFunctions.cc:308
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION() groupsandcommands(const std::string &fragment)
Returns a list of all console command groups AND all console command shortcuts.
Definition: ArgumentCompletionFunctions.cc:160
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION() tclthreads()
Returns a list of indexes of the available Tcl threads (see TclThreadManager).
Definition: ArgumentCompletionFunctions.cc:331
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI() command(const std::string &fragment)
Returns a list of commands and groups and also supports auto-completion of the arguments of these com...
Definition: ArgumentCompletionFunctions.cc:178
#define _CoreExport
Definition: CorePrereqs.h:61
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION() fallback()
Fallback implementation, returns an empty list.
Definition: ArgumentCompletionFunctions.cc:67
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION() subcommands(const std::string &fragment, const std::string &group)
Returns a list of all console commands in a given group.
Definition: ArgumentCompletionFunctions.cc:168
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI() hiddencommand(const std::string &fragment)
Returns a list of hidden commands and groups and also supports auto-completion of the arguments of th...
Definition: ArgumentCompletionFunctions.cc:202
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION() settingssections()
Returns the sections of the config file.
Definition: ArgumentCompletionFunctions.cc:278