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

This class defines the interface for a TShell command. More...

Detailed Description

This class defines the interface for a TShell command.

#include <Command.h>

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

Public Types

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...
 

Public Member Functions

virtual Result_T execute (Context_ &context, char *rawCmdString, Cpl::Io::Output &outfd) noexcept=0
 This method executes the command.
 
virtual const char * getVerb () const noexcept=0
 This method returns the command's verb string.
 
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 Security::Permission_T getMinPermissionRequired () const noexcept=0
 Returns the minimum required permission level needed to execute the command.
 
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 Member Functions

 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.
 

Additional Inherited Members

- 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

◆ Result_T

Possible result codes when executing a command.

Enumerator
eSUCCESS 

Command executed successfully.

eERROR_BAD_SYNTAX 

The command string cannot be parsed.

eERROR_INVALID_CMD 

Not a valid/supported command (Note: Typically this is only returned by the Command Processor - not individual commands)

eERROR_IO 

Command failed due to an error writing to the Output stream.

eERROR_MISSING_ARGS 

Command failed due to execute due to missing one or more required arguments.

eERROR_EXTRA_ARGS 

Command failed due to execute due to unexpected 'extra' arguments.

eERROR_INVALID_ARGS 

Command failed due to execute due to one or more arguments being invalid.

eERROR_FAILED 

Command failed to complete one or more of actions.

Constructor & Destructor Documentation

◆ Command()

Cpl::TShell::Command::Command ( )
inlineprotected

Constructor.

◆ ~Command()

virtual Cpl::TShell::Command::~Command ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ execute()

virtual Result_T Cpl::TShell::Command::execute ( Context_ & context,
char * rawCmdString,
Cpl::Io::Output & outfd )
pure virtualnoexcept

◆ getHelp()

virtual const char * Cpl::TShell::Command::getHelp ( ) const
pure virtualnoexcept

◆ getMinPermissionRequired()

virtual Security::Permission_T Cpl::TShell::Command::getMinPermissionRequired ( ) const
pure virtualnoexcept

Returns the minimum required permission level needed to execute the command.

Implemented in Cpl::TShell::Cmd::Command.

◆ getUsage()

virtual const char * Cpl::TShell::Command::getUsage ( ) const
pure virtualnoexcept

◆ getVerb()

virtual const char * Cpl::TShell::Command::getVerb ( ) const
pure virtualnoexcept

This method returns the command's verb string.

Implemented in Cpl::TShell::Cmd::Command.


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