DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
discord_core_api::message_printer Class Reference

Class for printing different types of messages to output and error streams. More...

#include <Base.hpp>

Static Public Member Functions

template<typename value_type >
static void initialize (const value_type &other)
 Initialize the message_printer with configuration settings and output/error streams. More...
 
template<print_message_type messageType, typename string_type >
static void printError (const string_type &what, std::source_location where=std::source_location::current())
 Print an error message of the specified type. More...
 
template<print_message_type messageType, typename string_type >
static void printSuccess (const string_type &what, std::source_location where=std::source_location::current())
 Print a success message of the specified type. More...
 

Member Function Documentation

◆ initialize()

template<typename value_type >
static void discord_core_api::message_printer::initialize ( const value_type &  other)
inlinestatic
Template Parameters
value_typethe type containing configuration settings.
Parameters
otheran instance of value_type with configuration settings.

Definition at line 206 of file Base.hpp.

Here is the caller graph for this function:

◆ printError()

template<print_message_type messageType, typename string_type >
static void discord_core_api::message_printer::printError ( const string_type &  what,
std::source_location  where = std::source_location::current() 
)
inlinestatic
Template Parameters
messageTypethe type of message to print.
Parameters
whatthe error message.
wherethe source location where the error occurred (default: current source location).

Definition at line 222 of file Base.hpp.

◆ printSuccess()

template<print_message_type messageType, typename string_type >
static void discord_core_api::message_printer::printSuccess ( const string_type &  what,
std::source_location  where = std::source_location::current() 
)
inlinestatic
Template Parameters
messageTypethe type of message to print.
Parameters
whatthe success message.
wherethe source location where the success occurred (default: current source location).

Definition at line 259 of file Base.hpp.


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