RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Public Member Functions | List of all members
ramses::IRamshCommand Class Referenceabstract

Class representing a ramses ramsh command. More...

#include <IRamshCommand.h>

Public Member Functions

virtual ~IRamshCommand ()=default
 Destructor of IRamshCommand. More...
 
virtual const std::string & keyword () const =0
 Keyword of this ramsh command. The keyword can be an alphanumeric string. Ramsh inputs having this keyword as first token will call this commands execute method. More...
 
virtual const std::string & help () const =0
 Helptext for this ramsh command. It will be displayed when the user invokes the 'help' command. It should be a short description of the command and its expected arguments. More...
 
virtual bool execute (const std::vector< std::string > &input)=0
 The command handler. It will be invoked with all ramsh command tokens. More...
 

Detailed Description

Class representing a ramses ramsh command.

These commands can be registered with ramses::RamsesFramework::addRamshCommand and will receive callbacks triggered via console input or DLT injection.

Constructor & Destructor Documentation

◆ ~IRamshCommand()

virtual ramses::IRamshCommand::~IRamshCommand ( )
virtualdefault

Destructor of IRamshCommand.

Member Function Documentation

◆ execute()

virtual bool ramses::IRamshCommand::execute ( const std::vector< std::string > &  input)
pure virtual

The command handler. It will be invoked with all ramsh command tokens.

Ramsh commands are separated by spaces and each resulting token will be passed as input. The command keyword itself is the first token.

Caution: This method will be invoked asynchronously from another thread. Blocking calls during execution can lead to unpredictable behavior.

Parameters
[in]inputThe command tokens including keyword
Returns
true if the command was successful, false if not

◆ help()

virtual const std::string& ramses::IRamshCommand::help ( ) const
pure virtual

Helptext for this ramsh command. It will be displayed when the user invokes the 'help' command. It should be a short description of the command and its expected arguments.

Returns
the help text

◆ keyword()

virtual const std::string& ramses::IRamshCommand::keyword ( ) const
pure virtual

Keyword of this ramsh command. The keyword can be an alphanumeric string. Ramsh inputs having this keyword as first token will call this commands execute method.

Returns
the keyword string

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