Sly Engine
ConsoleCommand Class Referenceabstract

#include <ConsoleCommand.h>

Inheritance diagram for ConsoleCommand:
Inheritance graph
Collaboration diagram for ConsoleCommand:
Collaboration graph

Public Member Functions

 ConsoleCommand ()=default
 Default Constructor. More...
 
 ConsoleCommand (const ConsoleCommand &)=delete
 Copy Constructor. More...
 
 ConsoleCommand (ConsoleCommand &&)=delete
 Move operator. More...
 
ConsoleCommandoperator= (const ConsoleCommand &)=delete
 Copy assignment operator. More...
 
ConsoleCommandoperator= (ConsoleCommand &&)=delete
 Move assignment operator. More...
 
virtual ~ConsoleCommand ()=default
 Destructor (Virtual from CommandBase) More...
 
virtual void execute ()=0
 The base command required to be implemented by all console commands. The resulting trigger mechanism that actually fires *this action. More...
 
virtual void initialize (std::vector< std::string > arguments)
 Initializer list of arguments. More...
 
- Public Member Functions inherited from CommandBase
 CommandBase ()=default
 Default constructor. More...
 
 CommandBase (const CommandBase &)=delete
 Copy constructor. More...
 
 CommandBase (CommandBase &&)=delete
 Move constructor. More...
 
CommandBaseoperator= (const CommandBase &)=delete
 Assignment operator. More...
 
CommandBaseoperator= (CommandBase &&)=delete
 Move assignment operator. More...
 
virtual ~CommandBase ()=default
 Deconstructor. More...
 

Constructor & Destructor Documentation

◆ ConsoleCommand() [1/3]

ConsoleCommand::ConsoleCommand ( )
default

Default Constructor.

◆ ConsoleCommand() [2/3]

ConsoleCommand::ConsoleCommand ( const ConsoleCommand )
delete

Copy Constructor.

◆ ConsoleCommand() [3/3]

ConsoleCommand::ConsoleCommand ( ConsoleCommand &&  )
delete

Move operator.

◆ ~ConsoleCommand()

virtual ConsoleCommand::~ConsoleCommand ( )
virtualdefault

Destructor (Virtual from CommandBase)

Member Function Documentation

◆ execute()

void ConsoleCommand::execute ( )
pure virtual

The base command required to be implemented by all console commands. The resulting trigger mechanism that actually fires *this action.

Implements CommandBase.

Implemented in KillCommand, GodCamCommand, PingCommand, TimeRequestCommand, and ReloadCommand.

◆ initialize()

void ConsoleCommand::initialize ( std::vector< std::string >  arguments)
inlinevirtual

Initializer list of arguments.

Parameters
argumentsThe arguments.

A command should override the initialize function iff it expects arguments. The arguments will come in the form of a vector of strings. The user is in charge of parsing the resulting string vector and handling input.

◆ operator=() [1/2]

ConsoleCommand& ConsoleCommand::operator= ( ConsoleCommand &&  )
delete

Move assignment operator.

◆ operator=() [2/2]

ConsoleCommand& ConsoleCommand::operator= ( const ConsoleCommand )
delete

Copy assignment operator.


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