|
swift
|
Value class for matching log messages based on their categories. More...
Public Member Functions | |
| CLogPattern () | |
| Default constructed CLogPattern will match any message. | |
| CLogPattern | withSeverity (CStatusMessage::StatusSeverity severity) const |
| Returns a CLogPattern which will match the same messages as this one, but only with a given severity. | |
| CLogPattern | withSeverities (const QSet< CStatusMessage::StatusSeverity > &severities) const |
| Returns a CLogPattern which will match the same messages as this one, but only with some given severities. | |
| CLogPattern | withSeverityAtOrAbove (CStatusMessage::StatusSeverity minimumSeverity) const |
| Returns a CLogPattern which will match the same messages, but only with a severity at or above the given severity. | |
| bool | match (const CStatusMessage &message) const |
| Returns true if the given message matches this pattern. | |
| bool | matches (const CVariant &message) const |
| This class acts as a SharedState filter when stored in a CVariant. | |
| QSet< QString > | getCategoryStrings () const |
| Technical category names matched by this pattern. | |
| bool | isProperSubsetOf (const CLogPattern &other) const |
| Returns true if this pattern is a proper subset of the other pattern. More... | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. More... | |
| void | marshallToDbus (QDBusArgument &argument) const |
| Marshall without begin/endStructure, for when composed within another object. More... | |
| void | unmarshallFromDbus (const QDBusArgument &argument) |
| Unmarshall without begin/endStructure, for when composed within another object. More... | |
| void | marshalToDataStream (QDataStream &stream) const |
| Marshal a value to a QDataStream. More... | |
| void | unmarshalFromDataStream (QDataStream &stream) |
| Unmarshal a value from a QDataStream. More... | |
Public Member Functions inherited from swift::misc::mixin::MetaType< CLogPattern > | |
| int | getMetaTypeId () const |
| Returns the Qt meta type ID of this object. More... | |
| QString | getClassName () const |
| Class name. | |
| bool | isA (int metaTypeId) const |
| Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
Public Member Functions inherited from swift::misc::mixin::Index< CLogPattern > | |
| CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
| Update by variant map. More... | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const CLogPattern &compareValue) const |
| Compare for index. | |
| bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
| Is given variant equal to value of property index? | |
Public Member Functions inherited from swift::misc::mixin::String< CLogPattern > | |
| QString | toQString (bool i18n=false) const |
| Cast as QString. | |
| std::string | toStdString (bool i18n=false) const |
| To std string. | |
| QString | stringForStreaming () const |
| String for streaming operators. | |
Public Member Functions inherited from swift::misc::mixin::Icon< CLogPattern > | |
| CIcons::IconIndex | toIcon () const |
| As icon, not implemented by all classes. | |
Static Public Member Functions | |
| static const QStringList & | allHumanReadableNames () |
| Get a list of human-readable names of predefined log patterns. | |
| static const CLogPattern & | fromHumanReadableName (const QString &name) |
| Return a predefined CLogPattern corresponding to the given human-readable name. | |
| static QStringList | humanReadableNamesFrom (const CStatusMessage &message) |
| Human readable categories of message. | |
| static QStringList | humanOrTechnicalCategoriesFrom (const CStatusMessage &message) |
| Human or machine readable categories of message. | |
| static CLogPattern | exactMatch (const CLogCategory &category) |
| Returns a CLogPattern which will match any message with the given category. | |
| static CLogPattern | anyOf (const CLogCategoryList &categories) |
| Returns a CLogPattern which will match any message with any of the given categories. | |
| static CLogPattern | allOf (const CLogCategoryList &categories) |
| Returns a CLogPattern which will match any message with all of the given categories. | |
| static CLogPattern | startsWith (const QString &prefix) |
| Returns a CLogPattern which will match any message with a category which starts with the given prefix. | |
| static CLogPattern | endsWith (const QString &suffix) |
| Returns a CLogPattern which will match any message with a category which ends with the given suffix. | |
| static CLogPattern | contains (const QString &substring) |
| Returns a CLogPattern which will match any message with a category which contains the given substring. | |
| static CLogPattern | empty () |
| Returns a CLogPattern which will match any message without a category. | |
Static Public Member Functions inherited from swift::misc::mixin::MetaType< CLogPattern > | |
| static void | registerMetadata () |
| Register metadata. | |
Additional Inherited Members | |
Public Types inherited from swift::misc::mixin::Index< CLogPattern > | |
| enum | ColumnIndex |
| Base class enums. | |
Value class for matching log messages based on their categories.
Definition at line 40 of file logpattern.h.
| QString swift::misc::CLogPattern::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 335 of file logpattern.cpp.
| bool swift::misc::CLogPattern::isProperSubsetOf | ( | const CLogPattern & | other | ) | const |
Returns true if this pattern is a proper subset of the other pattern.
Pattern A is a proper subset of pattern B iff pattern B would match every category which pattern A matches, plus at least one other category. This induces a partial ordering which can be used as the comparator in a topological sorting algorithm, to sort patterns by their generality.
Definition at line 211 of file logpattern.cpp.
| void swift::misc::CLogPattern::marshallToDbus | ( | QDBusArgument & | argument | ) | const |
Marshall without begin/endStructure, for when composed within another object.
Definition at line 355 of file logpattern.cpp.
| void swift::misc::CLogPattern::marshalToDataStream | ( | QDataStream & | stream | ) | const |
Marshal a value to a QDataStream.
Definition at line 378 of file logpattern.cpp.
| void swift::misc::CLogPattern::unmarshalFromDataStream | ( | QDataStream & | stream | ) |
Unmarshal a value from a QDataStream.
Definition at line 386 of file logpattern.cpp.
| void swift::misc::CLogPattern::unmarshallFromDbus | ( | const QDBusArgument & | argument | ) |
Unmarshall without begin/endStructure, for when composed within another object.
Definition at line 364 of file logpattern.cpp.