FreeNOS
Public Member Functions | Private Attributes
HelpCommand Class Reference
bin » sh

Prints the help info for all known ShellCommands. More...

#include <HelpCommand.h>

Inheritance diagram for HelpCommand:
ShellCommand

Public Member Functions

 HelpCommand (Shell *shell)
 Constructor. More...
 
virtual int execute (const Size nparams, const char **params)
 Executes the command. More...
 
- Public Member Functions inherited from ShellCommand
 ShellCommand (const char *name, const Size minParams=0)
 Constructor. More...
 
virtual ~ShellCommand ()
 Destructor. More...
 
const char * getName () const
 Get command name. More...
 
const char * getHelp () const
 Get command help. More...
 
Size getMinimumParams () const
 Get the minimum number of parameters required. More...
 

Private Attributes

Shellm_shell
 Shell object. More...
 

Additional Inherited Members

- Protected Attributes inherited from ShellCommand
const char * m_name
 Unique name of the command. More...
 
const char * m_help
 Command help text. More...
 
const Size m_minParams
 Minimum number of parameters required. More...
 

Detailed Description

Prints the help info for all known ShellCommands.

Definition at line 37 of file HelpCommand.h.

Constructor & Destructor Documentation

◆ HelpCommand()

HelpCommand::HelpCommand ( Shell shell)

Constructor.

Definition at line 24 of file HelpCommand.cpp.

References ShellCommand::m_help, and m_shell.

Member Function Documentation

◆ execute()

int HelpCommand::execute ( const Size  nparams,
const char **  params 
)
virtual

Executes the command.

Parameters
nparamsNumber of parameters given.
paramsArray of parameters.
Returns
Error code or zero on success.

Implements ShellCommand.

Definition at line 31 of file HelpCommand.cpp.

References Shell::getCommands(), HashIterator< K, V >::hasCurrent(), m_shell, and printf().

Field Documentation

◆ m_shell

Shell* HelpCommand::m_shell
private

Shell object.

Definition at line 58 of file HelpCommand.h.

Referenced by execute(), and HelpCommand().


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