Interactive CLI 2.3
A cross-platform C++14 library for interactive command-line interfaces
Loading...
Searching...
No Matches
cli::Command Class Referenceabstract

#include <command.h>

Inheritance diagram for cli::Command:

Public Member Functions

 Command (std::string _name)
virtual ~Command () noexcept=default
 Command (const Command &)=delete
 Command (Command &&)=delete
Command & operator= (const Command &)=delete
Command & operator= (Command &&)=delete
virtual void Enable ()
virtual void Disable ()
virtual bool Exec (const std::vector< std::string > &cmdLine, CliSession &session)=0
virtual void Help (detail::HelpGroup &entries) const =0
virtual std::vector< std::string > GetCompletionRecursive (const std::string &line) const

Protected Member Functions

const std::string & Name () const
bool IsEnabled () const

Detailed Description

Definition at line 45 of file command.h.

Constructor & Destructor Documentation

◆ Command() [1/3]

cli::Command::Command ( std::string _name)
inlineexplicit

Definition at line 48 of file command.h.

Here is the caller graph for this function:

◆ ~Command()

virtual cli::Command::~Command ( )
virtualdefaultnoexcept

◆ Command() [2/3]

cli::Command::Command ( const Command & )
delete

◆ Command() [3/3]

cli::Command::Command ( Command && )
delete

Member Function Documentation

◆ Disable()

virtual void cli::Command::Disable ( )
inlinevirtual

Definition at line 57 of file command.h.

◆ Enable()

virtual void cli::Command::Enable ( )
inlinevirtual

Definition at line 56 of file command.h.

Here is the caller graph for this function:

◆ Exec()

virtual bool cli::Command::Exec ( const std::vector< std::string > & cmdLine,
CliSession & session )
pure virtual

◆ GetCompletionRecursive()

virtual std::vector< std::string > cli::Command::GetCompletionRecursive ( const std::string & line) const
inlinevirtual

Reimplemented in cli::Menu.

Definition at line 60 of file command.h.

Here is the caller graph for this function:

◆ Help()

virtual void cli::Command::Help ( detail::HelpGroup & entries) const
pure virtual

◆ IsEnabled()

bool cli::Command::IsEnabled ( ) const
inlineprotected

Definition at line 69 of file command.h.

Here is the caller graph for this function:

◆ Name()

const std::string & cli::Command::Name ( ) const
inlineprotected

Definition at line 68 of file command.h.

Here is the caller graph for this function:

◆ operator=() [1/2]

Command & cli::Command::operator= ( Command && )
delete

◆ operator=() [2/2]

Command & cli::Command::operator= ( const Command & )
delete

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