TrinityCore
Trinity::Impl::ChatCommands::ChatCommandResult Struct Reference

#include <ChatCommandHelpers.h>

Public Member Functions

 ChatCommandResult (std::nullopt_t)
 
 ChatCommandResult (std::string const &)=delete
 
 ChatCommandResult (std::string &&s)
 
 ChatCommandResult (char const *c)
 
 ChatCommandResult (std::string_view s)
 
 ChatCommandResult (ChatCommandResult const &)=delete
 
 ChatCommandResult (ChatCommandResult &&)=default
 
ChatCommandResultoperator= (ChatCommandResult const &)=delete
 
ChatCommandResultoperator= (ChatCommandResult &&)=default
 
std::string_view operator* () const
 
bool IsSuccessful () const
 
 operator bool () const
 
bool HasErrorMessage () const
 
std::string const & GetErrorMessage () const
 

Private Attributes

std::variant< std::monostate, std::string_view, std::string > _storage
 

Detailed Description

Definition at line 101 of file ChatCommandHelpers.h.

Constructor & Destructor Documentation

◆ ChatCommandResult() [1/7]

Trinity::Impl::ChatCommands::ChatCommandResult::ChatCommandResult ( std::nullopt_t  )
inline

Definition at line 103 of file ChatCommandHelpers.h.

◆ ChatCommandResult() [2/7]

Trinity::Impl::ChatCommands::ChatCommandResult::ChatCommandResult ( std::string const &  )
delete

◆ ChatCommandResult() [3/7]

Trinity::Impl::ChatCommands::ChatCommandResult::ChatCommandResult ( std::string &&  s)
inline

Definition at line 105 of file ChatCommandHelpers.h.

◆ ChatCommandResult() [4/7]

Trinity::Impl::ChatCommands::ChatCommandResult::ChatCommandResult ( char const *  c)
inline

Definition at line 106 of file ChatCommandHelpers.h.

◆ ChatCommandResult() [5/7]

Trinity::Impl::ChatCommands::ChatCommandResult::ChatCommandResult ( std::string_view  s)
inline

Definition at line 107 of file ChatCommandHelpers.h.

◆ ChatCommandResult() [6/7]

Trinity::Impl::ChatCommands::ChatCommandResult::ChatCommandResult ( ChatCommandResult const &  )
delete

◆ ChatCommandResult() [7/7]

Trinity::Impl::ChatCommands::ChatCommandResult::ChatCommandResult ( ChatCommandResult &&  )
default

Member Function Documentation

◆ GetErrorMessage()

std::string const & Trinity::Impl::ChatCommands::ChatCommandResult::GetErrorMessage ( ) const
inline

Definition at line 118 of file ChatCommandHelpers.h.

+ Here is the caller graph for this function:

◆ HasErrorMessage()

bool Trinity::Impl::ChatCommands::ChatCommandResult::HasErrorMessage ( ) const
inline

Definition at line 117 of file ChatCommandHelpers.h.

+ Here is the caller graph for this function:

◆ IsSuccessful()

bool Trinity::Impl::ChatCommands::ChatCommandResult::IsSuccessful ( ) const
inline

Definition at line 115 of file ChatCommandHelpers.h.

+ Here is the caller graph for this function:

◆ operator bool()

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

Definition at line 116 of file ChatCommandHelpers.h.

+ Here is the call graph for this function:

◆ operator*()

std::string_view Trinity::Impl::ChatCommands::ChatCommandResult::operator* ( ) const
inline

Definition at line 114 of file ChatCommandHelpers.h.

◆ operator=() [1/2]

ChatCommandResult & Trinity::Impl::ChatCommands::ChatCommandResult::operator= ( ChatCommandResult &&  )
default

◆ operator=() [2/2]

ChatCommandResult & Trinity::Impl::ChatCommands::ChatCommandResult::operator= ( ChatCommandResult const &  )
delete

Member Data Documentation

◆ _storage

std::variant<std::monostate, std::string_view, std::string> Trinity::Impl::ChatCommands::ChatCommandResult::_storage
private

Definition at line 121 of file ChatCommandHelpers.h.


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