class OpCommand


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Public Static Methods


Detailed Description

 OpCommand (const list<string>& command_parts)

OpCommand

const list<string>&  command_parts ()

command_parts

[const]

const string&  command_name ()

command_name

[const]

const string&  help_string ()

help_string

[const]

const string&  module ()

module

[const]

const string&  command_action ()

command_action

[const]

void  set_help_string (const string& v)

set_help_string

void  set_module (const string& v)

set_module

void  set_command_action (const string& v)

set_command_action

void  set_command_action_filename (const string& v)

set_command_action_filename

void  set_command_action_arguments (const list<string>& v)

set_command_action_arguments

void  set_command_executable_filename (const string& v)

set_command_executable_filename

bool  is_executable ()

is_executable

[const]

void  add_opt_param (const string& opt_param, const string& opt_param_help)

add_opt_param

bool  has_opt_param (const string& opt_param)

has_opt_param

[const]

string  str ()

str

[const]

string  command_parts2command_name (const list<string>& command_parts)

command_parts2command_name

[static]

string  select_positional_argument (const list<string>& arguments, const string& position, string& error_msg)

select_positional_argument

[static]

Select a positional argument.

Parameters:

argumentsthe list with the arguments.
positionthe positional argument (e.g., "$0" specifies all arguments, "$1" is the first argument, "$2" the second argument, etc.)
error_msgthe error message (if error).

Returns: if position is valid, then the string with the selected argument, or an empty string if an error.

OpInstance*  execute (EventLoop& eventloop, const list<string>& command_line, RouterCLI::OpModePrintCallback print_cb, RouterCLI::OpModeDoneCallback done_cb)

execute

Execute an operational mode command.

Parameters:

eventloopthe event loop.
command_linecommand to execute and arguments
print_cbcallback to be invoked with output from command.
done_cbcallback to invoke when the command terminates.

Returns: a pointer to the command instance on success.

bool  command_match (const list<string>& path_parts, SlaveConfigTree* sct, bool exact_match)

command_match

[const]

void  get_matches (size_t wordnum, SlaveConfigTree* sct, map<string, string>& return_matches, bool& is_executable, bool& can_pipe)

get_matches

[const]

void  remove_instance (OpInstance* instance)

remove_instance


Generated by: pavlin on possum.icir.org on Wed Apr 13 21:53:23 2005, using kdoc $.