AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
CliCommandHolder Struct Reference

Storage class for commands issued for delayed execution. More...

#include "IWorld.h"

Public Types

using Print = void(*)(void *, std::string_view)
 
using CommandFinished = void(*)(void *, bool success)
 

Public Member Functions

 CliCommandHolder (void *callbackArg, char const *command, Print zprint, CommandFinished commandFinished)
 
 ~CliCommandHolder ()
 

Public Attributes

void * m_callbackArg
 
char * m_command
 
Print m_print
 
CommandFinished m_commandFinished
 

Private Member Functions

 CliCommandHolder (CliCommandHolder const &right)=delete
 
CliCommandHolderoperator= (CliCommandHolder const &right)=delete
 

Detailed Description

Storage class for commands issued for delayed execution.

Member Typedef Documentation

◆ CommandFinished

using CliCommandHolder::CommandFinished = void(*)(void*, bool success)

◆ Print

using CliCommandHolder::Print = void(*)(void*, std::string_view)

Constructor & Destructor Documentation

◆ CliCommandHolder() [1/2]

CliCommandHolder::CliCommandHolder ( void *  callbackArg,
char const *  command,
Print  zprint,
CommandFinished  commandFinished 
)
3235 : m_callbackArg(callbackArg), m_command(strdup(command)), m_print(zprint), m_commandFinished(commandFinished)
3236{
3237}
void commandFinished(void *, bool)
Definition: CliRunnable.cpp:86
CommandFinished m_commandFinished
Definition: IWorld.h:41
void * m_callbackArg
Definition: IWorld.h:38
Print m_print
Definition: IWorld.h:40
char * m_command
Definition: IWorld.h:39

◆ ~CliCommandHolder()

CliCommandHolder::~CliCommandHolder ( )
3240{
3241 free(m_command);
3242}

References m_command.

◆ CliCommandHolder() [2/2]

CliCommandHolder::CliCommandHolder ( CliCommandHolder const &  right)
privatedelete

Member Function Documentation

◆ operator=()

CliCommandHolder & CliCommandHolder::operator= ( CliCommandHolder const &  right)
privatedelete

Member Data Documentation

◆ m_callbackArg

void* CliCommandHolder::m_callbackArg

◆ m_command

char* CliCommandHolder::m_command

◆ m_commandFinished

CommandFinished CliCommandHolder::m_commandFinished

◆ m_print

Print CliCommandHolder::m_print