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

#include <ChatCommandHelpers.h>

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 77 of file ChatCommandHelpers.h.

Constructor & Destructor Documentation

◆ ChatCommandResult() [1/7]

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

Definition at line 79 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)
inlinenoexcept

Definition at line 81 of file ChatCommandHelpers.h.

◆ ChatCommandResult() [4/7]

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

Definition at line 82 of file ChatCommandHelpers.h.

◆ ChatCommandResult() [5/7]

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

Definition at line 83 of file ChatCommandHelpers.h.

◆ ChatCommandResult() [6/7]

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

◆ ChatCommandResult() [7/7]

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

◆ ~ChatCommandResult()

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

Member Function Documentation

◆ GetErrorMessage() [1/2]

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

Definition at line 102 of file ChatCommandHelpers.h.

◆ GetErrorMessage() [2/2]

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

Definition at line 101 of file ChatCommandHelpers.h.

+ Here is the caller graph for this function:

◆ HasErrorMessage()

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

Definition at line 100 of file ChatCommandHelpers.h.

+ Here is the caller graph for this function:

◆ IsSuccessful()

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

Definition at line 98 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 99 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 97 of file ChatCommandHelpers.h.

◆ operator=() [1/6]

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

Definition at line 87 of file ChatCommandHelpers.h.

◆ operator=() [2/6]

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

◆ operator=() [3/6]

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

◆ operator=() [4/6]

ChatCommandResult & Trinity::Impl::ChatCommands::ChatCommandResult::operator= ( std::nullopt_t  )
inlinenoexcept

Definition at line 85 of file ChatCommandHelpers.h.

◆ operator=() [5/6]

ChatCommandResult & Trinity::Impl::ChatCommands::ChatCommandResult::operator= ( std::string &&  s)
inlinenoexcept

Definition at line 86 of file ChatCommandHelpers.h.

◆ operator=() [6/6]

ChatCommandResult & Trinity::Impl::ChatCommands::ChatCommandResult::operator= ( std::string_view  s)
inlinenoexcept

Definition at line 88 of file ChatCommandHelpers.h.

Member Data Documentation

◆ _storage

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

Definition at line 105 of file ChatCommandHelpers.h.


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