WarpX
Classes | Enumerations | Functions
ablastr::utils::msg_logger Namespace Reference

Classes

struct  Msg
 
struct  MsgWithCounter
 
struct  MsgWithCounterAndRanks
 
class  Logger
 

Enumerations

enum class  Priority { low , medium , high }
 

Functions

std::string PriorityToString (const Priority &priority)
 This function converts a Priority into the corresponding string (e.g, Priority::low --> "low") More...
 
Priority StringToPriority (const std::string &priority_string)
 This function converts a string into the corresponding priority (e.g, "low" --> Priority::low) More...
 
constexpr bool operator< (const Msg &l, const Msg &r)
 This implements the < operator for Msg. Warning messages are first ordered by priority (warning: high < medium < low to give precedence to higher priorities), then by topic (alphabetically), and finally by text (alphabetically). More...
 

Enumeration Type Documentation

◆ Priority

Priority is recorded together with messages. It influences the display order and the appearance of a message.

Enumerator
low 

Low priority message

medium 

Medium priority message

high 

High priority message

Function Documentation

◆ operator<()

constexpr bool ablastr::utils::msg_logger::operator< ( const Msg l,
const Msg r 
)
constexpr

This implements the < operator for Msg. Warning messages are first ordered by priority (warning: high < medium < low to give precedence to higher priorities), then by topic (alphabetically), and finally by text (alphabetically).

Parameters
[in]la Msg
[in]ra Msg
Returns
true if l<r, false otherwise

◆ PriorityToString()

std::string ablastr::utils::msg_logger::PriorityToString ( const Priority priority)

This function converts a Priority into the corresponding string (e.g, Priority::low --> "low")

Parameters
[in]prioritythe priority
Returns
the corresponding string

◆ StringToPriority()

Priority ablastr::utils::msg_logger::StringToPriority ( const std::string &  priority_string)

This function converts a string into the corresponding priority (e.g, "low" --> Priority::low)

Parameters
[in]priority_stringthe priority string
Returns
the corresponding priority