1#ifndef TAGPARSER_DIAGNOSTICS_H
2#define TAGPARSER_DIAGNOSTICS_H
6#include <c++utilities/chrono/datetime.h>
50 const std::string &
message()
const;
51 const std::string &
context()
const;
55 static std::string
formatList(
const std::vector<std::string> &values);
59 std::string m_message;
60 std::string m_context;
61 CppUtilities::DateTime m_creationTime;
145 return m_creationTime;
153 return m_level == other.m_level && m_message == other.m_message && m_context == other.m_context;
159 Diagnostics(std::initializer_list<DiagMessage> list);
The DiagMessage class holds an information, warning or error gathered during parsing or making.
std::string_view levelName() const
Returns the string representation of the level().
DiagMessage(DiagLevel level, const std::string &message, const std::string &context)
Constructs a new DiagMessage.
static std::string formatList(const std::vector< std::string > &values)
Concatenates the specified string values to a list.
DiagLevel level() const
Returns the level.
bool operator==(const DiagMessage &other) const
Returns whether the current instance equals other.
const CppUtilities::DateTime & creationTime() const
Returns the creation time (using GMT timezone).
const std::string & context() const
Returns the context.
const std::string & message() const
Returns the message.
bool has(DiagLevel level) const
Returns whether there's at least one DiagMessage which is at least as worse as level.
DiagLevel level() const
Returns the worst diag level present in the container.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.
constexpr DiagLevel & operator|=(DiagLevel &lhs, const DiagLevel &rhs)
Sets lhs to rhs if rhs is more critical than lhs and returns lhs.
TAG_PARSER_EXPORT std::string_view diagLevelName(DiagLevel diagLevel)
Returns the string representation of the specified diagLevel.
DiagLevel
Specifies the level of the diagnostic message.
constexpr auto worstDiagLevel
The worst diag level.