TrinityCore
Loading...
Searching...
No Matches
Trinity::Impl::ChatCommands::CommandInvoker Struct Reference

#include <ChatCommand.h>

Public Member Functions

 CommandInvoker ()=default
 
template<typename TypedHandler >
 CommandInvoker (TypedHandler &handler)
 
 CommandInvoker (bool(&handler)(ChatHandler *, char const *))
 
 operator bool () const
 
bool operator() (ChatHandler *chatHandler, std::string_view args) const
 

Private Types

using wrapper_func = std::add_pointer_t< bool(void *, ChatHandler *, std::string_view) noexcept >
 

Static Private Member Functions

static bool LegacyWrapper (void *handler, ChatHandler *chatHandler, std::string_view argsStr) noexcept
 

Private Attributes

wrapper_func _wrapper = nullptr
 
void * _handler = nullptr
 

Detailed Description

Definition at line 142 of file ChatCommand.h.

Member Typedef Documentation

◆ wrapper_func

using Trinity::Impl::ChatCommands::CommandInvoker::wrapper_func = std::add_pointer_t<bool(void*, ChatHandler*, std::string_view) noexcept>
private

Definition at line 165 of file ChatCommand.h.

Constructor & Destructor Documentation

◆ CommandInvoker() [1/3]

Trinity::Impl::ChatCommands::CommandInvoker::CommandInvoker ( )
default

◆ CommandInvoker() [2/3]

template<typename TypedHandler >
Trinity::Impl::ChatCommands::CommandInvoker::CommandInvoker ( TypedHandler &  handler)
inline

Definition at line 146 of file ChatCommand.h.

◆ CommandInvoker() [3/3]

Trinity::Impl::ChatCommands::CommandInvoker::CommandInvoker ( bool(&)(ChatHandler *, char const *)  handler)
inline

Definition at line 147 of file ChatCommand.h.

Member Function Documentation

◆ LegacyWrapper()

static bool Trinity::Impl::ChatCommands::CommandInvoker::LegacyWrapper ( void *  handler,
ChatHandler chatHandler,
std::string_view  argsStr 
)
inlinestaticprivatenoexcept

Definition at line 157 of file ChatCommand.h.

◆ operator bool()

Trinity::Impl::ChatCommands::CommandInvoker::operator bool ( ) const
inlineexplicit

Definition at line 149 of file ChatCommand.h.

◆ operator()()

bool Trinity::Impl::ChatCommands::CommandInvoker::operator() ( ChatHandler chatHandler,
std::string_view  args 
) const
inline

Definition at line 150 of file ChatCommand.h.

Member Data Documentation

◆ _handler

void* Trinity::Impl::ChatCommands::CommandInvoker::_handler = nullptr
private

Definition at line 167 of file ChatCommand.h.

◆ _wrapper

wrapper_func Trinity::Impl::ChatCommands::CommandInvoker::_wrapper = nullptr
private

Definition at line 166 of file ChatCommand.h.


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