TrinityCore
Trinity::Impl::ChatCommands::ChatCommandNode Class Reference

#include <ChatCommand.h>

Public Member Functions

 ChatCommandNode ()
 

Static Public Member Functions

static void LoadCommandMap ()
 
static void InvalidateCommandMap ()
 
static bool TryExecuteCommand (ChatHandler &handler, std::string_view cmd)
 
static void SendCommandHelpFor (ChatHandler &handler, std::string_view cmd)
 
static std::vector< std::string > GetAutoCompletionsFor (ChatHandler const &handler, std::string_view cmd)
 

Private Types

using ChatCommandBuilder = Trinity::ChatCommands::ChatCommandBuilder
 

Private Member Functions

void LoadFromBuilder (ChatCommandBuilder const &builder)
 
 ChatCommandNode (ChatCommandNode &&other)=default
 
void ResolveNames (std::string name)
 
void SendCommandHelp (ChatHandler &handler) const
 
bool IsVisible (ChatHandler const &who) const
 
bool IsInvokerVisible (ChatHandler const &who) const
 
bool HasVisibleSubCommands (ChatHandler const &who) const
 

Static Private Member Functions

static std::map< std::string_view, ChatCommandNode, StringCompareLessI_T > const & GetTopLevelMap ()
 
static void LoadCommandsIntoMap (ChatCommandNode *blank, std::map< std::string_view, ChatCommandNode, StringCompareLessI_T > &map, Trinity::ChatCommands::ChatCommandTable const &commands)
 

Private Attributes

std::string _name
 
CommandInvoker _invoker
 
CommandPermissions _permission
 
std::variant< std::monostate, TrinityStrings, std::string > _help
 
std::map< std::string_view, ChatCommandNode, StringCompareLessI_T_subCommands
 

Friends

struct FilteredCommandListIterator
 

Detailed Description

Definition at line 177 of file ChatCommand.h.

Member Typedef Documentation

◆ ChatCommandBuilder

Constructor & Destructor Documentation

◆ ChatCommandNode() [1/2]

Trinity::Impl::ChatCommands::ChatCommandNode::ChatCommandNode ( )
inline

Definition at line 189 of file ChatCommand.h.

◆ ChatCommandNode() [2/2]

Trinity::Impl::ChatCommands::ChatCommandNode::ChatCommandNode ( ChatCommandNode &&  other)
privatedefault

Member Function Documentation

◆ GetAutoCompletionsFor()

std::vector< std::string > Trinity::Impl::ChatCommands::ChatCommandNode::GetAutoCompletionsFor ( ChatHandler const &  handler,
std::string_view  cmd 
)
static

Definition at line 374 of file ChatCommand.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTopLevelMap()

ChatSubCommandMap const & Trinity::Impl::ChatCommands::ChatCommandNode::GetTopLevelMap ( )
staticprivate

Definition at line 69 of file ChatCommand.cpp.

+ Here is the call graph for this function:

◆ HasVisibleSubCommands()

bool Trinity::Impl::ChatCommands::ChatCommandNode::HasVisibleSubCommands ( ChatHandler const &  who) const
private

Definition at line 470 of file ChatCommand.cpp.

+ Here is the caller graph for this function:

◆ InvalidateCommandMap()

void Trinity::Impl::ChatCommands::ChatCommandNode::InvalidateCommandMap ( )
static

Definition at line 75 of file ChatCommand.cpp.

+ Here is the caller graph for this function:

◆ IsInvokerVisible()

bool Trinity::Impl::ChatCommands::ChatCommandNode::IsInvokerVisible ( ChatHandler const &  who) const
private

Definition at line 461 of file ChatCommand.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsVisible()

bool Trinity::Impl::ChatCommands::ChatCommandNode::IsVisible ( ChatHandler const &  who) const
inlineprivate

Definition at line 201 of file ChatCommand.h.

+ Here is the call graph for this function:

◆ LoadCommandMap()

void Trinity::Impl::ChatCommands::ChatCommandNode::LoadCommandMap ( )
static

Definition at line 76 of file ChatCommand.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadCommandsIntoMap()

void Trinity::Impl::ChatCommands::ChatCommandNode::LoadCommandsIntoMap ( ChatCommandNode blank,
std::map< std::string_view, ChatCommandNode, StringCompareLessI_T > &  map,
Trinity::ChatCommands::ChatCommandTable const &  commands 
)
staticprivate

Definition at line 47 of file ChatCommand.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadFromBuilder()

void Trinity::Impl::ChatCommands::ChatCommandNode::LoadFromBuilder ( ChatCommandBuilder const &  builder)
private

Definition at line 32 of file ChatCommand.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResolveNames()

void Trinity::Impl::ChatCommands::ChatCommandNode::ResolveNames ( std::string  name)
private

Definition at line 124 of file ChatCommand.cpp.

◆ SendCommandHelp()

void Trinity::Impl::ChatCommands::ChatCommandNode::SendCommandHelp ( ChatHandler handler) const
private

Definition at line 171 of file ChatCommand.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendCommandHelpFor()

void Trinity::Impl::ChatCommands::ChatCommandNode::SendCommandHelpFor ( ChatHandler handler,
std::string_view  cmd 
)
static

Definition at line 312 of file ChatCommand.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TryExecuteCommand()

bool Trinity::Impl::ChatCommands::ChatCommandNode::TryExecuteCommand ( ChatHandler handler,
std::string_view  cmd 
)
static

Definition at line 245 of file ChatCommand.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ FilteredCommandListIterator

friend struct FilteredCommandListIterator
friend

Definition at line 179 of file ChatCommand.h.

Member Data Documentation

◆ _help

std::variant<std::monostate, TrinityStrings, std::string> Trinity::Impl::ChatCommands::ChatCommandNode::_help
private

Definition at line 208 of file ChatCommand.h.

◆ _invoker

CommandInvoker Trinity::Impl::ChatCommands::ChatCommandNode::_invoker
private

Definition at line 206 of file ChatCommand.h.

◆ _name

std::string Trinity::Impl::ChatCommands::ChatCommandNode::_name
private

Definition at line 205 of file ChatCommand.h.

◆ _permission

CommandPermissions Trinity::Impl::ChatCommands::ChatCommandNode::_permission
private

Definition at line 207 of file ChatCommand.h.

◆ _subCommands

std::map<std::string_view, ChatCommandNode, StringCompareLessI_T> Trinity::Impl::ChatCommands::ChatCommandNode::_subCommands
private

Definition at line 209 of file ChatCommand.h.


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