LeechCraft 0.6.70-19214-g121e5318a7
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
anutil.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
12#include "xpcconfig.h"
13
14namespace LC::Util::AN
15{
20 UTIL_XPC_API QMap<QString, QString> GetCategoryNameMap ();
21
30 UTIL_XPC_API QStringList GetKnownEventTypes (const QString& category);
31
44 UTIL_XPC_API QString GetCategoryName (const QString& category);
45
57 UTIL_XPC_API QString GetTypeName (const QString& type);
58
59 UTIL_XPC_API QVariant ToVariant (const LC::AN::StringValueMatcher::Pattern& matcher);
60 UTIL_XPC_API std::optional<LC::AN::StringValueMatcher::Pattern> StringPatternFromVariant (const QVariant& variant);
61
62 UTIL_XPC_API bool Matches (const QString& string, const LC::AN::StringValueMatcher& matcher);
63 UTIL_XPC_API bool Matches (const QStringList& strings, const LC::AN::StringValueMatcher& matcher);
64 UTIL_XPC_API bool Matches (const QUrl& url, const LC::AN::StringValueMatcher& matcher);
65 UTIL_XPC_API bool Matches (bool value, const LC::AN::BoolValueMatcher& matcher);
66 UTIL_XPC_API bool Matches (int value, const LC::AN::IntValueMatcher& matcher);
67
68 UTIL_XPC_API bool Matches (const QVariant& var, QMetaType::Type expected, const LC::AN::ValueMatcher& matcher);
69}
std::variant< BoolValueMatcher, IntValueMatcher, StringValueMatcher > ValueMatcher
A matcher for a value of any supported type.
Definition ianemitter.h:194
QMap< QString, QString > GetCategoryNameMap()
Returns the map from the category ID to its name.
Definition anutil.cpp:22
bool Matches(const QString &string, const LC::AN::StringValueMatcher &matcher)
Definition anutil.cpp:206
QVariant ToVariant(const SVM::Pattern &matcher)
Definition anutil.cpp:162
std::optional< SVM::Pattern > StringPatternFromVariant(const QVariant &var)
Definition anutil.cpp:174
QStringList GetKnownEventTypes(const QString &category)
Returns the known events types for the given category.
Definition anutil.cpp:38
QString GetTypeName(const QString &type)
Returns the human-readable name of the event type.
Definition anutil.cpp:118
QString GetCategoryName(const QString &category)
Returns the human-readable name of the event category.
Definition anutil.cpp:113
#define UTIL_XPC_API
Definition xpcconfig.h:16