fgms 0.11.8
The
FlightGear MultiPlayer Server
project
filter.hxx
Go to the documentation of this file.
1 // This program is free software; you can redistribute it and/or
2 // modify it under the terms of the GNU General Public License as
3 // published by the Free Software Foundation; either version 2 of the
4 // License, or (at your option) any later version.
5 //
6 // This program is distributed in the hope that it will be useful, but
7 // WITHOUT ANY WARRANTY; without even the implied warranty of
8 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 // General Public License for more details.
10 //
11 // You should have received a copy of the GNU General Public License
12 // along with this program; if not, write to the Free Software
13 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, U$
14 //
15 // derived from libcli by David Parrish (david@dparrish.com)
16 // Copyright (C) 2011 Oliver Schroeder
17 //
18 
19 
20 #ifndef CLI_FILTER_H
21 #define CLI_FILTER_H
22 
23 namespace LIBCLI
24 {
25 
27 {
28  const char *cmd;
29  const char *help;
30 };
31 
32 class CLI;
33 class Client;
34 typedef int (Client::*filter_callback_func) (char *cmd, void *data);
35 
36 class filter_t
37 {
38 public:
40  void *data;
42  int exec (Client& Instance, char *cmd);
43  int exec (Client& Instance, char *cmd, void *data);
44 };
45 
46 }; // namespace LIBCLI
47 
48 #endif
const char * help
Definition: filter.hxx:29
filter_t * next
Definition: filter.hxx:41
filter_callback_func filter
Definition: filter.hxx:39
const char * cmd
Definition: filter.hxx:28
int exec(Client &Instance, char *cmd)
Definition: filter.cxx:33
int(Client::* filter_callback_func)(char *cmd, void *data)
Definition: filter.hxx:34