6 #ifndef SWIFT_MISC_LOGPATTERN_H
7 #define SWIFT_MISC_LOGPATTERN_H
9 #include <QDBusArgument>
13 #include <QStringList>
29 template <
class Key,
class T>
35 class CLogCategoryList;
112 bool isProperSubsetOf(
const CLogPattern &other)
const;
115 QString convertToQString(
bool i18n =
false)
const;
124 void marshalToDataStream(
QDataStream &stream)
const;
130 bool checkInvariants()
const;
144 CLogPattern(Strategy strategy,
const QSet<QString> &strings);
150 const QString &getString()
const
152 Q_ASSERT(m_strategy == ExactMatch && m_strings.
size() == 1);
153 return *m_strings.
begin();
155 const QString &getPrefix()
const
157 Q_ASSERT(m_strategy == StartsWith && m_strings.
size() == 1);
158 return *m_strings.
begin();
160 const QString &getSuffix()
const
162 Q_ASSERT(m_strategy == EndsWith && m_strings.
size() == 1);
163 return *m_strings.
begin();
165 const QString &getSubstring()
const
167 Q_ASSERT(m_strategy == Contains && m_strings.
size() == 1);
168 return *m_strings.
begin();
A log category is an arbitrary string tag which can be attached to log messages.
A sequence of log categories.
Value class for matching log messages based on their categories.
QSet< QString > getCategoryStrings() const
Technical category names matched by this pattern.
bool matches(const CVariant &message) const
This class acts as a SharedState filter when stored in a CVariant.
Streamable status message, e.g.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
T to() const
Synonym for value().
CRTP class template which will generate marshalling operators for a derived class with its own marsha...
CRTP class template to generate non-member QDataStream streaming operators.
CRTP class template from which a derived class can inherit icon-related functions.
CRTP class template from which a derived class can inherit property indexing functions.
CRTP class template from which a derived class can inherit string streaming operations.
Free functions in swift::misc.
StatusSeverity
Status severities.
QSet< T >::iterator begin()
qsizetype size() const const
#define SWIFT_MISC_EXPORT
Export a class or function from the library.