22#include <QtCore/QCoreApplication>
23#include <QtCore/QMetaEnum>
24#include <QtCore/QString>
25#include <QtCore/QStringView>
26#include <QtCore/QStringList>
27#include <QtCore/QVector>
28#include <QtCore/QDebug>
86 virtual const Key *
asKey()
const {
return nullptr; }
89 virtual const Any *
asAny()
const {
return nullptr; }
148 const Key *
asKey()
const override {
return this; }
159 QMetaEnum metaEnum = QMetaEnum::fromType<PathRoot>();
185 Q_ASSERT(
false &&
"Unexpected contextKind in name");
209 QMetaEnum metaEnum = QMetaEnum::fromType<PathCurrent>();
243 Q_ASSERT(
false &&
"Unexpected contextKind in Current::name");
274 Kind kind()
const override {
return Kind::Filter; }
317 friend class QQmlJS::Dom::PathEls::TestPaths;
320 return reinterpret_cast<Base*
>(&
data);
323 return reinterpret_cast<const Base*
>(&
data);
330 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&empty) &&
"non C++11 compliant compiler");
331 new (&empty)
Empty(
d.empty);
334 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&field) &&
"non C++11 compliant compiler");
335 new (&field) Field(
d.field);
338 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&
index) &&
"non C++11 compliant compiler");
339 new (&
index) Index(
d.index);
342 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&
key) &&
"non C++11 compliant compiler");
346 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&root) &&
"non C++11 compliant compiler");
347 new (&root) Root(
d.root);
350 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(¤t) &&
"non C++11 compliant compiler");
351 new (¤t) Current(
d.current);
354 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&any) &&
"non C++11 compliant compiler");
355 new (&any) Any(
d.any);
358 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&
filter) &&
"non C++11 compliant compiler");
359 new (&
filter) Filter(
d.filter);
364 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&empty) &&
"non C++11 compliant compiler");
367 Data(
const Field &
o) {
368 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&field) &&
"non C++11 compliant compiler");
371 Data(
const Index &
o){
372 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&
index) &&
"non C++11 compliant compiler");
376 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&
key) &&
"non C++11 compliant compiler");
379 Data(
const Root &
o) {
380 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&root) &&
"non C++11 compliant compiler");
383 Data(
const Current &
o) {
384 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(¤t) &&
"non C++11 compliant compiler");
388 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&any) &&
"non C++11 compliant compiler");
391 Data(
const Filter &
o) {
392 Q_ASSERT(
static_cast<void*
>(
this)==
static_cast<void*
>(&
filter) &&
"non C++11 compliant compiler");
402 return reinterpret_cast<const Base*
>(
this)->kind();
405 reinterpret_cast<const Base*
>(
this)->~Base();
438#define QMLDOM_USTRING(s) u##s
439#define QMLDOM_FIELD(name) inline constexpr const auto name = QMLDOM_USTRING(#name)
666 *
this = appendComponent(
c);
670 Path operator[](
int i)
const;
671 explicit operator bool()
const;
678 Kind headKind()
const;
682 std::function<bool(
DomItem)> headFilter()
const;
689 Path dropFront(
int n = 1)
const;
690 Path dropTail(
int n = 1)
const;
723 Path path(
Path toAdd,
bool avoidToAddAsBase =
false)
const;
725 Path expandFront()
const;
726 Path expandBack()
const;
729 Path operator ++(
int);
743 friend class QQmlJS::Dom::PathEls::TestPaths;
745 friend size_t qHash(
const Path &,
size_t);
747 Path noEndOffset()
const;
751 std::shared_ptr<PathEls::PathData>
m_data = {};
799 size_t *
it = &
buf[0];
801 if (
path.length()>0) {
802 int iPath =
path.length();
803 size_t maxPath =
bufSize / 2 - 1;
804 size_t endPath = (size_t(iPath) > maxPath) ? maxPath - iPath : 0;
805 while (
size_t(iPath) > endPath) {
809 *
it++ =
qHash(
p.component(0).stringView(),
seed)^size_t(
p.headRoot())^size_t(
p.headCurrent());
static JNINativeMethod methods[]
static QByteArray fromRawData(const char *data, qsizetype size)
Constructs a QByteArray that uses the first size bytes of the data array.
static constexpr QChar fromLatin1(char c) noexcept
Converts the Latin-1 character c to its equivalent QChar.
convenience macro creating a new ErrorGroup and registering its groupId as translatable string
Represents a set of tags grouping a set of related error messages.
Represents an error message connected to the dom.
Kind kind() const override
QString name() const override
bool checkName(QStringView s) const override
const Any * asAny() const override
bool hasSquareBrackets() const override
virtual const Index * asIndex() const
virtual const Any * asAny() const
virtual Kind kind() const =0
virtual bool hasSquareBrackets() const
virtual const Field * asField() const
virtual QStringView stringView() const
virtual const Filter * asFilter() const
virtual const Key * asKey() const
virtual const Current * asCurrent() const
virtual index_type index(index_type defaultValue=-1) const
virtual void dump(Sink sink) const
virtual const Empty * asEmpty() const
virtual bool checkName(QStringView s) const =0
virtual QString name() const =0
virtual const Root * asRoot() const
QStringView stringView() const override
Kind kind() const override
const Current * asCurrent() const override
QString name() const override
bool checkName(QStringView s) const override
Kind kind() const override
const Empty * asEmpty() const override
QString name() const override
bool checkName(QStringView s) const override
bool checkName(QStringView s) const override
Kind kind() const override
QString name() const override
void dump(Sink sink) const override
const Field * asField() const override
QStringView stringView() const override
bool hasSquareBrackets() const override
Kind kind() const override
QStringView stringView() const override
std::function< bool(DomItem)> filterFunction
Filter(std::function< bool(DomItem)> f, QStringView filterDescription=u"<native code filter>")
QStringView filterDescription
const Filter * asFilter() const override
const Index * asIndex() const override
bool hasSquareBrackets() const override
bool checkName(QStringView s) const override
QString name() const override
Kind kind() const override
index_type index(index_type=-1) const override
QStringView stringView() const override
QString name() const override
void dump(Sink sink) const override
Kind kind() const override
bool checkName(QStringView s) const override
const Key * asKey() const override
bool hasSquareBrackets() const override
void dump(Sink sink) const
const Key * asKey() const
const Index * asIndex() const
const Empty * asEmpty() const
PathComponent(const Filter &o)
const Any * asAny() const
PathComponent(const Key &o)
bool checkName(QStringView s) const
PathComponent(const Any &o)
static int cmp(const PathComponent &p1, const PathComponent &p2)
PathComponent(const Empty &o)
QStringView stringView() const
PathComponent(const Index &o)
const Field * asField() const
PathComponent(const Field &o)
PathComponent(const Root &o)
index_type index(index_type defaultValue=-1) const
PathComponent(const Current &o)
const Current * asCurrent() const
const Root * asRoot() const
bool hasSquareBrackets() const
QVector< PathComponent > components
std::shared_ptr< PathData > parent
PathData(QStringList strData, QVector< PathComponent > components, std::shared_ptr< PathData > parent)
PathData(QStringList strData, QVector< PathComponent > components)
Kind kind() const override
void dump(Sink sink) const override
const Root * asRoot() const override
QStringView stringView() const override
QString name() const override
bool checkName(QStringView s) const override
bool operator==(const PathIterator &o) const
PathIterator operator++()
bool operator!=(const PathIterator &o) const
static int cmp(const Path &p1, const Path &p2)
Path filter(std::function< bool(DomItem)>, QStringView desc=u"<native code filter>") const
Path filter(std::function< bool(DomItem)>, QString) const
Path dropFront(int n=1) const
Path(const PathEls::PathComponent &c)
std::forward_iterator_tag iterator_category
QString toString() const
Returns a deep copy of this string view's data as a QString.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString & append(QChar c)
QSet< QString >::iterator it
QList< QVariant > arguments
bool operator>=(const PathComponent &lhs, const PathComponent &rhs)
bool operator<=(const PathComponent &lhs, const PathComponent &rhs)
bool operator==(const PathComponent &lhs, const PathComponent &rhs)
bool operator!=(const PathComponent &lhs, const PathComponent &rhs)
bool operator>(const PathComponent &lhs, const PathComponent &rhs)
bool operator<(const PathComponent &lhs, const PathComponent &rhs)
std::function< void(const ErrorMessage &)> ErrorHandler
QDebug operator<<(QDebug d, AST::Node *n)
bool operator!=(const Version &v1, const Version &v2)
void sinkEscaped(Sink sink, QStringView s, EscapeOptions options)
dumps a string as quoted string (escaping things like quotes or newlines)
bool operator>(const Version &v1, const Version &v2)
size_t qHash(const Path &, size_t)
bool operator>=(const Version &v1, const Version &v2)
bool operator==(const Version &v1, const Version &v2)
bool operator<=(const Version &v1, const Version &v2)
bool operator<(const Version &v1, const Version &v2)
Combined button and popup list for selecting options.
#define Q_DECLARE_TR_FUNCTIONS(context)
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
static QDBusError::ErrorType get(const char *name)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
GLenum GLsizei GLsizei GLint * values
[15]
GLint GLenum GLint components
GLenum GLenum GLsizei const GLuint * ids
GLsizei GLenum GLenum * types
GLenum GLuint GLenum GLsizei length
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLsizei const GLchar *const * path
GLsizei GLenum GLboolean sink
static qreal component(const QPointF &point, unsigned int i)
#define QMLDOM_FIELD(name)
static bool fromString(const QMetaObject *mo, QString s, Allocate &&allocate)
static bool isComposite(const QQmlJSScope::ConstPtr &scope)
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
static void split(QT_FT_Vector *b)
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
static QString dump(const QByteArray &)
static QString canonicalPath(const QString &rootPath)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
static const QTextHtmlElement elements[Html_NumElements]
ReturnedValue read(const char *data)
gzip write("uncompressed data")
char * toString(const MyType &t)
[31]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent