My Project
Public Member Functions | Private Attributes | List of all members
uuid::console::Commands::AvailableCommand Class Reference

Available command for execution on a Shell. More...

#include <uuid/console.h>

Collaboration diagram for uuid::console::Commands::AvailableCommand:
Collaboration graph
[legend]

Public Member Functions

 AvailableCommand (const Command &command)
 Construct a new command that is available for execution on a Shell. More...
 
const std::vector< std::string > & name () const
 Get the name of the command. More...
 
const std::vector< std::string > & arguments () const
 Get the help text of the command's arguments. More...
 
const command_functionfunction () const
 Get the function to be used when the command is executed. More...
 
const argument_completion_functionarg_function () const
 Get the function to be used to perform argument completions for the command. More...
 
int flags () const
 Get the shell flags that must be set for this command to be available. More...
 
int not_flags () const
 Get the shell flags that must not be set for this command to be available. More...
 

Private Attributes

const Commands::Commandcommand_
 
std::vector< std::string > name_
 
std::vector< std::string > arguments_
 

Detailed Description

Available command for execution on a Shell.

Since
0.9.0

Definition at line 139 of file console.h.

Constructor & Destructor Documentation

◆ AvailableCommand()

uuid::console::Commands::AvailableCommand::AvailableCommand ( const Command command)

Construct a new command that is available for execution on a Shell.

Since
0.9.0

Definition at line 33 of file commands_iterable.cpp.

Member Function Documentation

◆ arg_function()

const argument_completion_function& uuid::console::Commands::AvailableCommand::arg_function ( ) const
inline

Get the function to be used to perform argument completions for the command.

Returns
Function that can be used to perform argument completions for the command.
Since
0.9.0

Definition at line 178 of file console.h.

◆ arguments()

const std::vector<std::string>& uuid::console::Commands::AvailableCommand::arguments ( ) const
inline

Get the help text of the command's arguments.

Returns
Help text for arguments that the command accepts as a std::vector of strings.
Since
0.9.0

Definition at line 162 of file console.h.

◆ flags()

int uuid::console::Commands::AvailableCommand::flags ( ) const
inline

Get the shell flags that must be set for this command to be available.

Returns
Shell flags.
Since
0.9.0

Definition at line 186 of file console.h.

◆ function()

const command_function& uuid::console::Commands::AvailableCommand::function ( ) const
inline

Get the function to be used when the command is executed.

Returns
Function that can be used to execute the command.
Since
0.9.0

Definition at line 170 of file console.h.

◆ name()

const std::vector<std::string>& uuid::console::Commands::AvailableCommand::name ( ) const
inline

Get the name of the command.

Returns
Name of the command as a std::vector of strings.
Since
0.9.0

Definition at line 154 of file console.h.

◆ not_flags()

int uuid::console::Commands::AvailableCommand::not_flags ( ) const
inline

Get the shell flags that must not be set for this command to be available.

Returns
Shell flags.
Since
0.9.0

Definition at line 194 of file console.h.

Member Data Documentation

◆ arguments_

std::vector<std::string> uuid::console::Commands::AvailableCommand::arguments_
private

Help text for arguments that the command accepts.

Since
0.9.0

Definition at line 199 of file console.h.

◆ command_

const Commands::Command& uuid::console::Commands::AvailableCommand::command_
private

Command that is available.

Since
0.9.0

Definition at line 197 of file console.h.

◆ name_

std::vector<std::string> uuid::console::Commands::AvailableCommand::name_
private

Name of the command.

Since
0.9.0

Definition at line 198 of file console.h.


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