fgms 0.11.8
The
FlightGear MultiPlayer Server
project
LIBCLI::Command< C > Class Template Reference

#include <command.hxx>

Inheritance diagram for LIBCLI::Command< C >:
LIBCLI::CommandBase

Public Types

typedef int(* c_callback_func) (C &obj, char *command, char **argv, int argc)
 
typedef int(C::* cpp_callback_func) (char *command, char **argv, int argc)
 

Public Member Functions

 Command ()
 
 Command (C *obj, const char *command, PRIVLEVEL level, MODE mode, const char *help)
 
 Command (C *obj, const char *command, c_callback_func callback, PRIVLEVEL level, MODE mode, const char *help)
 
 Command (C *obj, const char *command, cpp_callback_func callback, PRIVLEVEL level, MODE mode, const char *help)
 
 ~Command ()
 
int exec (char *command, char **argv, int argc)
 
int exec (C &Instance, char *command, char **argv, int argc)
 

Private Member Functions

 Command (const C &obj)
 

Private Attributes

C_obj
 
c_callback_func c_callback
 
Commandchildren
 
char * command
 
cpp_callback_func cpp_callback
 
bool have_callback
 
char * help
 
MODE mode
 
Commandnext
 
Commandparent
 
PRIVLEVEL privilege
 
unsigned int unique_len
 

Friends

class CLI
 

Detailed Description

template<class C>
class LIBCLI::Command< C >

Definition at line 37 of file command.hxx.

Member Typedef Documentation

template<class C>
typedef int( * LIBCLI::Command< C >::c_callback_func) (C &obj, char *command, char **argv, int argc)

Definition at line 41 of file command.hxx.

template<class C>
typedef int( C::* LIBCLI::Command< C >::cpp_callback_func) (char *command, char **argv, int argc)

Definition at line 42 of file command.hxx.

Constructor & Destructor Documentation

template<class C >
LIBCLI::Command< C >::Command ( )

Definition at line 88 of file command.hxx.

template<class C>
LIBCLI::Command< C >::Command ( C obj,
const char *  command,
PRIVLEVEL  level,
MODE  mode,
const char *  help 
)

Definition at line 106 of file command.hxx.

template<class C>
LIBCLI::Command< C >::Command ( C obj,
const char *  command,
c_callback_func  callback,
PRIVLEVEL  level,
MODE  mode,
const char *  help 
)

Definition at line 140 of file command.hxx.

template<class C>
LIBCLI::Command< C >::Command ( C obj,
const char *  command,
cpp_callback_func  callback,
PRIVLEVEL  level,
MODE  mode,
const char *  help 
)

Definition at line 182 of file command.hxx.

template<class C >
LIBCLI::Command< C >::~Command ( )

Definition at line 224 of file command.hxx.

template<class C>
LIBCLI::Command< C >::Command ( const C obj)
private

Member Function Documentation

template<class C >
int LIBCLI::Command< C >::exec ( char *  command,
char **  argv,
int  argc 
)

Definition at line 243 of file command.hxx.

Referenced by LIBCLI::CLI::find_command().

template<class C>
int LIBCLI::Command< C >::exec ( C Instance,
char *  command,
char **  argv,
int  argc 
)

Definition at line 268 of file command.hxx.

Friends And Related Function Documentation

template<class C>
friend class CLI
friend

Definition at line 40 of file command.hxx.

Member Data Documentation

template<class C>
C* LIBCLI::Command< C >::_obj
private

Definition at line 79 of file command.hxx.

template<class C>
c_callback_func LIBCLI::Command< C >::c_callback
private

Definition at line 81 of file command.hxx.

template<class C>
cpp_callback_func LIBCLI::Command< C >::cpp_callback
private

Definition at line 82 of file command.hxx.

template<class C>
bool LIBCLI::Command< C >::have_callback
private

Definition at line 80 of file command.hxx.

Referenced by LIBCLI::CLI::find_command(), and LIBCLI::CLI::get_completions().

template<class C>
char* LIBCLI::Command< C >::help
private
template<class C>
MODE LIBCLI::Command< C >::mode
private
template<class C>
Command* LIBCLI::Command< C >::parent
private

Definition at line 78 of file command.hxx.

Referenced by LIBCLI::CLI::find_command(), and LIBCLI::CLI::register_command().

template<class C>
PRIVLEVEL LIBCLI::Command< C >::privilege
private

Definition at line 73 of file command.hxx.

Referenced by LIBCLI::CLI::build_shortest(), and LIBCLI::CLI::find_command().

template<class C>
unsigned int LIBCLI::Command< C >::unique_len
private

The documentation for this class was generated from the following file: