|
Bifrost SDK
Bifrost SDK documentation
|
A Message object that of a specific MessageKind, optional MessageClass, and a MessageText that relates to an optional Source. More...
#include <Message.h>
Public Member Functions | |
| AMINO_CORE_SHARED_DECL | Message () |
| Default constructor (empty message). More... | |
| AMINO_CORE_SHARED_DECL | Message (Source source, MessageKind kind, MessageClass cls, MessageText text) |
| Constructs a message with the given Source, MessageKind, MessageClass, and MessageText. More... | |
| template<typename Arg , typename... Args> | |
| Message (Source source, MessageKind kind, MessageClass cls, MessageText text, Arg const &arg, Args const &... args) | |
| Constructs a message with the given Source, MessageKind, MessageClass, and MessageText and format arguments. More... | |
| AMINO_CORE_SHARED_DECL | Message (Message const &o) |
| Copy constructor. More... | |
| AMINO_CORE_SHARED_DECL | Message (Message &&o) noexcept |
| Move constructor. More... | |
| AMINO_CORE_SHARED_DECL Message & | operator= (Message const &o) |
| Copy assignment operator. More... | |
| AMINO_CORE_SHARED_DECL Message & | operator= (Message &&o) noexcept |
| Move assignment operator. More... | |
| AMINO_CORE_SHARED_DECL | ~Message () |
| Destructor. More... | |
| AMINO_CORE_SHARED_DECL Source const & | getSource () const |
| Get the source of the message. More... | |
| AMINO_CORE_SHARED_DECL MessageKind | getKind () const |
| Get the kind of message. More... | |
| AMINO_CORE_SHARED_DECL MessageClass | getClass () const |
| Get the message class. More... | |
| AMINO_CORE_SHARED_DECL String | getText () const |
| Get the message text. More... | |
| template<typename Os > | |
| AMINO_INTERNAL_FORCEINLINE void | toStream (Os &os, bool newline=true) const |
| Write the formatted message to the given output stream. More... | |
| AMINO_CORE_SHARED_DECL String | getFormattedText () const |
| Get the formatted text of the message. More... | |
| AMINO_CORE_SHARED_DECL bool | isValid () const |
| Whether the message is valid or not (not default constructed). More... | |
| operator bool () const | |
| Whether the message is valid or not (not default constructed). More... | |
Static Public Member Functions | |
| static constexpr StringView | toString (MessageKind kind) |
| Get the string representation of the MessageKind. More... | |
A Message object that of a specific MessageKind, optional MessageClass, and a MessageText that relates to an optional Source.
The MessageKind indicates the severity of the message (error, warning, info, debug).
The MessageClass allows for categorizing messages into different classes, which can be useful for filtering or grouping messages.
The MessageText contains the actual message text, which can include format specifiers that will be replaced with the given format arguments when the message is constructed.
The Source can be used to indicate the provenance of the message, which can be used for example to retreive some datamodel entities for which the message was created.
| AMINO_CORE_SHARED_DECL Amino::Message::Message | ( | ) |
Default constructor (empty message).
| AMINO_CORE_SHARED_DECL Amino::Message::Message | ( | Source | source, |
| MessageKind | kind, | ||
| MessageClass | cls, | ||
| MessageText | text | ||
| ) |
Constructs a message with the given Source, MessageKind, MessageClass, and MessageText.
|
inline |
Constructs a message with the given Source, MessageKind, MessageClass, and MessageText and format arguments.
See MessageText for details about the format text and format arguments.
| AMINO_CORE_SHARED_DECL Amino::Message::Message | ( | Message const & | o | ) |
Copy constructor.
|
noexcept |
Move constructor.
| AMINO_CORE_SHARED_DECL Amino::Message::~Message | ( | ) |
Destructor.
| AMINO_CORE_SHARED_DECL MessageClass Amino::Message::getClass | ( | ) | const |
Get the message class.
| AMINO_CORE_SHARED_DECL String Amino::Message::getFormattedText | ( | ) | const |
| AMINO_CORE_SHARED_DECL MessageKind Amino::Message::getKind | ( | ) | const |
Get the kind of message.
| AMINO_CORE_SHARED_DECL Source const & Amino::Message::getSource | ( | ) | const |
Get the source of the message.
| AMINO_CORE_SHARED_DECL String Amino::Message::getText | ( | ) | const |
Get the message text.
| AMINO_CORE_SHARED_DECL bool Amino::Message::isValid | ( | ) | const |
Whether the message is valid or not (not default constructed).
Referenced by operator bool().
|
inlineexplicit |
Move assignment operator.
Copy assignment operator.
|
inline |
|
inlinestaticconstexpr |
Get the string representation of the MessageKind.
Definition at line 175 of file Message.h.
References Amino::eDebug, Amino::eError, Amino::eInfo, and Amino::eWarning.