uses the singleton pattern (as we only have one terminal)
More...
#include <MHO_Message.hh>
uses the singleton pattern (as we only have one terminal)
class for managing messages to stdout
- Author
- J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
- Date
- Wed Oct 14 17:17:31 2020 -0400
◆ MHO_Message() [1/2]
Deleted copy constructor (singleton).
◆ MHO_Message() [2/2]
Deleted move constructor (singleton).
◆ AcceptAllKeys()
void hops::MHO_Message::AcceptAllKeys |
( |
| ) |
|
|
inline |
Allow all message keys (no category/library filtering).
◆ AddKey() [1/2]
void hops::MHO_Message::AddKey |
( |
const char * |
key | ) |
|
◆ AddKey() [2/2]
void hops::MHO_Message::AddKey |
( |
const std::string & |
key | ) |
|
Add a message key to the allowed key set.
- Parameters
-
key | The key string to add. |
◆ Flush()
void hops::MHO_Message::Flush |
( |
| ) |
|
Flush the current output stream buffer.
◆ GetInstance()
Access the singleton instance of the message handler.
- Returns
- Reference to the singleton MHO_Message instance.
◆ GetMessageLevel()
Get the currently configured message level threshold.
- Returns
- The currently allowed message level.
◆ LimitToKeySet()
void hops::MHO_Message::LimitToKeySet |
( |
| ) |
|
|
inline |
Restrict messages to a defined key set.
◆ Lock()
void hops::MHO_Message::Lock |
( |
| ) |
|
|
inline |
Lock the message handler for thread-safe operations.
◆ operator<<() [1/3]
◆ operator<<() [2/3]
◆ operator<<() [3/3]
template<class XStreamableItemType >
MHO_Message & hops::MHO_Message::operator<< |
( |
const XStreamableItemType & |
item | ) |
|
Stream an item into the current message.
- Template Parameters
-
XStreamableItemType | Any type that supports output streaming via operator<< . |
- Parameters
-
item | The item to insert into the message stream. |
- Returns
- Reference to the MHO_Message instance for chaining.
◆ operator=() [1/2]
Deleted move assignment operator (singleton).
◆ operator=() [2/2]
Deleted copy assignment operator (singleton).
◆ RemoveAllKeys()
void hops::MHO_Message::RemoveAllKeys |
( |
| ) |
|
Remove all message keys (disables all filtering).
◆ RemoveKey() [1/2]
void hops::MHO_Message::RemoveKey |
( |
const char * |
key | ) |
|
◆ RemoveKey() [2/2]
void hops::MHO_Message::RemoveKey |
( |
const std::string & |
key | ) |
|
Remove a message key from the allowed key set.
- Parameters
-
key | The key string to remove. |
◆ SendMessage() [1/2]
◆ SendMessage() [2/2]
Begin a new message with a specific level and key.
- Parameters
-
level | The message level. |
key | The message key to associate with this message. |
- Returns
- Reference to the MHO_Message instance for streaming content.
◆ SetLegacyMessageLevel()
void hops::MHO_Message::SetLegacyMessageLevel |
( |
int |
legacy_message_level | ) |
|
Set the message level using a legacy integer interface.
- Parameters
-
legacy_message_level | legacy integer representation of message level (lower is more verbose, min: -2, max: 5). |
◆ SetMessageLevel()
Set the allowed message level threshold.
- Parameters
-
level | The new minimum message level to accept. |
◆ Unlock()
void hops::MHO_Message::Unlock |
( |
| ) |
|
|
inline |
Unlock the message handler.
The documentation for this class was generated from the following files: