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)
 

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/5]

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

◆ ChatCommandBuilder() [2/5]

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

◆ ChatCommandBuilder() [3/5]

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:252
std::variant< InvokerEntry, SubCommandEntry > _data
Definition: ChatCommand.h:253

◆ ChatCommandBuilder() [4/5]

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/5]

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 } { }

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