AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::ChatCommands::ChatCommandBuilder Struct Reference

#include "ChatCommand.h"

Classes

struct  InvokerEntry
 

Public Types

using SubCommandEntry = std::reference_wrapper< std::vector< ChatCommandBuilder > const >
 

Public Member Functions

 ChatCommandBuilder (ChatCommandBuilder &&)=default
 
 ChatCommandBuilder (ChatCommandBuilder const &)=default
 
template<typename TypedHandler >
 ChatCommandBuilder (char const *name, TypedHandler &handler, AcoreStrings help, uint32 securityLevel, Acore::ChatCommands::Console allowConsole)
 
template<typename TypedHandler >
 ChatCommandBuilder (char const *name, TypedHandler &handler, uint32 securityLevel, Acore::ChatCommands::Console allowConsole)
 
 ChatCommandBuilder (char const *name, std::vector< ChatCommandBuilder > const &subCommands)
 
 ChatCommandBuilder (char const *name, bool(&handler)(ChatHandler *, char const *), uint32 securityLevel, Acore::ChatCommands::Console allowConsole)
 
template<typename TypedHandler >
 ChatCommandBuilder (char const *name, uint32 securityLevel, bool console, TypedHandler *handler, char const *)
 
 ChatCommandBuilder (char const *name, uint32, bool, std::nullptr_t, char const *, std::vector< ChatCommandBuilder > const &sub)
 

Private Attributes

std::string_view _name
 
std::variant< InvokerEntry, SubCommandEntry_data
 

Friends

class Acore::Impl::ChatCommands::ChatCommandNode
 

Detailed Description

Member Typedef Documentation

◆ SubCommandEntry

using Acore::ChatCommands::ChatCommandBuilder::SubCommandEntry = std::reference_wrapper<std::vector<ChatCommandBuilder> const>

Constructor & Destructor Documentation

◆ ChatCommandBuilder() [1/8]

Acore::ChatCommands::ChatCommandBuilder::ChatCommandBuilder ( ChatCommandBuilder &&  )
default

◆ ChatCommandBuilder() [2/8]

Acore::ChatCommands::ChatCommandBuilder::ChatCommandBuilder ( ChatCommandBuilder const &  )
default

◆ ChatCommandBuilder() [3/8]

template<typename TypedHandler >
Acore::ChatCommands::ChatCommandBuilder::ChatCommandBuilder ( char const *  name,
TypedHandler &  handler,
AcoreStrings  help,
uint32  securityLevel,
Acore::ChatCommands::Console  allowConsole 
)
inline
242 : _name{ ASSERT_NOTNULL(name) }, _data{ std::in_place_type<InvokerEntry>, handler, help, securityLevel, allowConsole } { }
#define ASSERT_NOTNULL(pointer)
Definition: Errors.h:85
std::string_view _name
Definition: ChatCommand.h:265
std::variant< InvokerEntry, SubCommandEntry > _data
Definition: ChatCommand.h:266

◆ ChatCommandBuilder() [4/8]

template<typename TypedHandler >
Acore::ChatCommands::ChatCommandBuilder::ChatCommandBuilder ( char const *  name,
TypedHandler &  handler,
uint32  securityLevel,
Acore::ChatCommands::Console  allowConsole 
)
inline
246 : ChatCommandBuilder(name, handler, AcoreStrings(), securityLevel, allowConsole) { }
AcoreStrings
Definition: Language.h:29
ChatCommandBuilder(ChatCommandBuilder &&)=default

◆ ChatCommandBuilder() [5/8]

Acore::ChatCommands::ChatCommandBuilder::ChatCommandBuilder ( char const *  name,
std::vector< ChatCommandBuilder > const &  subCommands 
)
inline
249 : _name{ ASSERT_NOTNULL(name) }, _data{ std::in_place_type<SubCommandEntry>, subCommands } { }

◆ ChatCommandBuilder() [6/8]

Acore::ChatCommands::ChatCommandBuilder::ChatCommandBuilder ( char const *  name,
bool(&)(ChatHandler *, char const *)  handler,
uint32  securityLevel,
Acore::ChatCommands::Console  allowConsole 
)
inline
253 : ChatCommandBuilder(name, handler, AcoreStrings(), securityLevel, allowConsole) { }

◆ ChatCommandBuilder() [7/8]

template<typename TypedHandler >
Acore::ChatCommands::ChatCommandBuilder::ChatCommandBuilder ( char const *  name,
uint32  securityLevel,
bool  console,
TypedHandler *  handler,
char const *   
)
inline
258 : ChatCommandBuilder(name, *handler, AcoreStrings(), securityLevel, static_cast<Acore::ChatCommands::Console>(console)) { }
Console
Definition: ChatCommand.h:43

◆ ChatCommandBuilder() [8/8]

Acore::ChatCommands::ChatCommandBuilder::ChatCommandBuilder ( char const *  name,
uint32  ,
bool  ,
std::nullptr_t  ,
char const *  ,
std::vector< ChatCommandBuilder > const &  sub 
)
inline
262 : ChatCommandBuilder(name, sub) { }

Friends And Related Function Documentation

◆ Acore::Impl::ChatCommands::ChatCommandNode

Member Data Documentation

◆ _data

std::variant<InvokerEntry, SubCommandEntry> Acore::ChatCommands::ChatCommandBuilder::_data
private

◆ _name

std::string_view Acore::ChatCommands::ChatCommandBuilder::_name
private