VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtChatCommand Class Referenceabstract

Detailed Description

Formerly declared in vreChatCommandsManager.h. Register concrete implementations with DtVreChatManager::addCommand().

#include <vreChatManager.h>

Inheritance diagram for makVre::DtChatCommand:
[legend]

Public Member Functions

virtual ~DtChatCommand ()=default
 
virtual bool execute (const std::string &parameters)=0
 
virtual std::weak_ptr< DtChatCommand > getWeak ()
 
virtual std::string help (const std::string &parameters)
 
virtual bool showInHelp () const
 

Static Public Member Functions

static bool splitString (const std::string &stringToSplit, std::vector< std::string > &tokenized, const char delimiter=' ')
 

Constructor & Destructor Documentation

◆ ~DtChatCommand()

virtual makVre::DtChatCommand::~DtChatCommand ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ execute()

virtual bool makVre::DtChatCommand::execute ( const std::string & parameters)
pure virtual

Executes this command with the given parameter string.

Parameters
parametersEverything after the command name
Returns
True if the command executed successfully

◆ getWeak()

virtual std::weak_ptr< DtChatCommand > makVre::DtChatCommand::getWeak ( )
inlinevirtual

Returns a weak pointer to this command instance.

◆ help()

virtual std::string makVre::DtChatCommand::help ( const std::string & parameters)
inlinevirtual

Returns help text for this command.

Parameters
parametersOptional context passed when generating help

◆ showInHelp()

virtual bool makVre::DtChatCommand::showInHelp ( ) const
inlinevirtual

Whether this command appears in /help output.

◆ splitString()

static bool makVre::DtChatCommand::splitString ( const std::string & stringToSplit,
std::vector< std::string > & tokenized,
const char delimiter = ' ' )
static

Splits a string into tokens on a delimiter.

Parameters
stringToSplitInput string
tokenizedOutput token vector
delimiterSplit character (default: space)
Returns
True if split produced tokens

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