xorp

CliCommandMatch Class Reference

List of all members.

Public Member Functions

 CliCommandMatch (const string &command_name, const string &help_string, bool is_executable, bool can_pipe)
const string & command_name () const
 Get the command name.
const string & help_string () const
 Get the help string for the command.
bool is_executable () const
 Test if the command is executable.
bool can_pipe () const
 Test if the command supports pipes.
bool default_nomore_mode () const
 Test if "no-more" (i.e., unpaged) is the default output mode.
void set_default_nomore_mode (bool v)
 Set the default paging mode.
bool is_command_argument () const
 Test if the command actually represents a command argument.
void set_is_command_argument (bool v)
 Set a flag whether the command actually represents a command argument.
bool is_argument_expected () const
 Test if the command expects an argument.
void set_is_argument_expected (bool v)
 Set a flag whether the command expects an argument.
const CliCommand::TypeMatchCb & type_match_cb () const
 Get a reference to the type matching callback.
void set_type_match_cb (const CliCommand::TypeMatchCb &cb)
 Set the type matching callback.

Private Attributes

string _command_name
string _help_string
bool _is_executable
bool _can_pipe
bool _default_nomore_mode
bool _is_command_argument
bool _is_argument_expected
CliCommand::TypeMatchCb _type_match_cb

Member Function Documentation

bool CliCommandMatch::can_pipe ( ) const [inline]

Test if the command supports pipes.

Returns:
true if the command supports pipes, otherwise false.
const string& CliCommandMatch::command_name ( ) const [inline]

Get the command name.

Returns:
the command name.
bool CliCommandMatch::default_nomore_mode ( ) const [inline]

Test if "no-more" (i.e., unpaged) is the default output mode.

Returns:
true if "no-more" (i.e., unpaged) is the default output mode, otherwise false.
const string& CliCommandMatch::help_string ( ) const [inline]

Get the help string for the command.

Returns:
the help string for the command.
bool CliCommandMatch::is_argument_expected ( ) const [inline]

Test if the command expects an argument.

Returns:
true if the command expects an argument, otherwise false.
bool CliCommandMatch::is_command_argument ( ) const [inline]

Test if the command actually represents a command argument.

Returns:
true if the command actually represents a command argument.
bool CliCommandMatch::is_executable ( ) const [inline]

Test if the command is executable.

Returns:
true if the command is executable, otherwise false.
void CliCommandMatch::set_default_nomore_mode ( bool  v) [inline]

Set the default paging mode.

Parameters:
vif true, then "no-more" (i.e., unpaged) is the default output mode.
void CliCommandMatch::set_is_argument_expected ( bool  v) [inline]

Set a flag whether the command expects an argument.

Parameters:
vtrue if the command expectes an argument, otherwise false.
void CliCommandMatch::set_is_command_argument ( bool  v) [inline]

Set a flag whether the command actually represents a command argument.

Parameters:
vtrue if the command represents a command argument, otherwise false.
void CliCommandMatch::set_type_match_cb ( const CliCommand::TypeMatchCb &  cb) [inline]

Set the type matching callback.

Parameters:
cbthe type matching callback.
const CliCommand::TypeMatchCb& CliCommandMatch::type_match_cb ( ) const [inline]

Get a reference to the type matching callback.

Returns:
a reference to the type matching callback.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations