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

Command for execution on a Shell. More...

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

Public Member Functions

 Command (unsigned int flags, unsigned int not_flags, const flash_string_vector name, const flash_string_vector arguments, command_function function, argument_completion_function arg_function)
 Create a command for execution on a Shell. More...
 
size_t minimum_arguments () const
 Determine the minimum number of arguments for this command based on the help text for the arguments that begin with the "<" character. More...
 
size_t maximum_arguments () const
 Determine the maximum number of arguments for this command based on the length of help text for the arguments. More...
 

Public Attributes

unsigned int flags_
 
unsigned int not_flags_
 
const flash_string_vector name_
 
const flash_string_vector arguments_
 
command_function function_
 
argument_completion_function arg_function_
 

Private Member Functions

 Command (const Command &)=delete
 
Commandoperator= (const Command &)=delete
 

Detailed Description

Command for execution on a Shell.

Since
0.1.0

Definition at line 662 of file console.h.

Constructor & Destructor Documentation

◆ Command()

uuid::console::Commands::Command::Command ( unsigned int  flags,
unsigned int  not_flags,
const flash_string_vector  name,
const flash_string_vector  arguments,
command_function  function,
argument_completion_function  arg_function 
)

Create a command for execution on a Shell.

Parameters
[in]flagsShell flags that must be set for this command to be available.
[in]not_flagsShell flags that must not be set for this command to be available.
[in]nameName of the command as a std::vector of flash strings.
[in]argumentsHelp text for arguments that the command accepts as a std::vector of flash strings (use "<" to indicate a required argument).
[in]functionFunction to be used when the command is executed.
[in]arg_functionFunction to be used to perform argument completions for this command.
Since
0.8.0

Definition at line 514 of file commands.cpp.

Member Function Documentation

◆ maximum_arguments()

size_t uuid::console::Commands::Command::maximum_arguments ( ) const
inline

Determine the maximum number of arguments for this command based on the length of help text for the arguments.

Returns
The maximum number of arguments for this command.
Since
0.1.0

Definition at line 703 of file console.h.

◆ minimum_arguments()

size_t uuid::console::Commands::Command::minimum_arguments ( ) const

Determine the minimum number of arguments for this command based on the help text for the arguments that begin with the "<" character.

Returns
The minimum number of arguments for this command.
Since
0.1.0

Definition at line 526 of file commands.cpp.

Member Data Documentation

◆ arg_function_

argument_completion_function uuid::console::Commands::Command::arg_function_

Function to be used to perform argument completions for this command.

Since
0.1.0

Definition at line 710 of file console.h.

◆ arguments_

const flash_string_vector uuid::console::Commands::Command::arguments_

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

Since
0.1.0

Definition at line 708 of file console.h.

◆ flags_

unsigned int uuid::console::Commands::Command::flags_

Shell flags that must be set for this command to be available.

Since
0.1.0

Definition at line 705 of file console.h.

◆ function_

command_function uuid::console::Commands::Command::function_

Function to be used when the command is executed.

Since
0.1.0

Definition at line 709 of file console.h.

◆ name_

const flash_string_vector uuid::console::Commands::Command::name_

Name of the command as a std::vector of flash strings.

Since
0.1.0

Definition at line 707 of file console.h.

◆ not_flags_

unsigned int uuid::console::Commands::Command::not_flags_

Shell flags that must not be set for this command to be available.

Since
0.8.0

Definition at line 706 of file console.h.


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