GM6000 Digital Heater Controller Build: 16 (Branch = develop)
SDX-1330
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
Cpl::TShell::Cmd::Command Class Reference

This partially concrete class implements infrastructure and/or common functionality for a Shell command. More...

Detailed Description

This partially concrete class implements infrastructure and/or common functionality for a Shell command.

#include <Command.h>

Inheritance diagram for Cpl::TShell::Cmd::Command:
[legend]
Collaboration diagram for Cpl::TShell::Cmd::Command:
[legend]

Public Member Functions

const char * getVerb () const noexcept
 See Cpl::TShell::Command.
 
Security::Permission_T getMinPermissionRequired () const noexcept
 See Cpl::TShell::Command.
 
- Public Member Functions inherited from Cpl::TShell::Command
virtual Result_T execute (Context_ &context, char *rawCmdString, Cpl::Io::Output &outfd) noexcept=0
 This method executes the command.
 
virtual const char * getUsage () const noexcept=0
 This method returns the command's usage string.
 
virtual const char * getHelp () const noexcept=0
 This method returns the command's detailed help string.
 
virtual ~Command ()
 Virtual destructor.
 
- Public Member Functions inherited from Cpl::Container::Item
bool insert_ (void *newContainerPtr)
 Helper method to trap when inserting an item in multiple containers.
 
bool isInContainer_ (const void *containerPtr) const noexcept
 Returns 'true' if the instance is in the specified container.
 

Protected Types

enum  CondResult_T { eFALSE , eTRUE , eERROR }
 Result when processing a conditional statement. More...
 

Protected Member Functions

 Command (Cpl::Container::SList< Cpl::TShell::Command > &commandList, const char *verb, Security::Permission_T minPermLevel=OPTION_TSHELL_CMD_COMMAND_DEFAULT_PERMISSION_LEVEL) noexcept
 Constructor.
 
- Protected Member Functions inherited from Cpl::TShell::Command
 Command ()
 Constructor.
 
- Protected Member Functions inherited from Cpl::Container::Item
 Item ()
 Constructor.
 
 Item (const char *)
 Constructor used ONLY with the child class MapItem: -->special constructor to allow a Map to be statically allocated.
 

Protected Attributes

const char * m_verb
 Command verb.
 
Security::Permission_T m_minPermissionLevel
 Minimum required user permission need to execute me.
 

Additional Inherited Members

- Public Types inherited from Cpl::TShell::Command
enum  Result_T {
  eSUCCESS = 0 , eERROR_BAD_SYNTAX = 1 , eERROR_INVALID_CMD = 2 , eERROR_IO = 3 ,
  eERROR_MISSING_ARGS = 4 , eERROR_EXTRA_ARGS = 5 , eERROR_INVALID_ARGS = 6 , eERROR_FAILED = 7
}
 Possible result codes when executing a command. More...
 
- Static Public Member Functions inherited from Cpl::Container::Item
static void remove_ (Item *itemPtr) noexcept
 Helper method to do the proper 'clean-up' for the multiple-containers-error-trap when removing an item from a container.
 
- Public Attributes inherited from Cpl::Container::Item
voidm_nextPtr_
 The link field.
 
voidm_inListPtr_
 Debug field.
 

Member Enumeration Documentation

◆ CondResult_T

Result when processing a conditional statement.

Enumerator
eFALSE 

The conditional statement evaluated to false.

eTRUE 

The conditional statement evaluated to true.

eERROR 

Error occurring during the evaluation of the conditional.

Constructor & Destructor Documentation

◆ Command()

Cpl::TShell::Cmd::Command::Command ( Cpl::Container::SList< Cpl::TShell::Command > & commandList,
const char * verb,
Security::Permission_T minPermLevel = OPTION_TSHELL_CMD_COMMAND_DEFAULT_PERMISSION_LEVEL )
protectednoexcept

Constructor.

Member Function Documentation

◆ getMinPermissionRequired()

Security::Permission_T Cpl::TShell::Cmd::Command::getMinPermissionRequired ( ) const
virtualnoexcept

◆ getVerb()

const char * Cpl::TShell::Cmd::Command::getVerb ( ) const
virtualnoexcept

Member Data Documentation

◆ m_minPermissionLevel

Security::Permission_T Cpl::TShell::Cmd::Command::m_minPermissionLevel
protected

Minimum required user permission need to execute me.

◆ m_verb

const char* Cpl::TShell::Cmd::Command::m_verb
protected

Command verb.


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