4#ifndef QHARMONYJSOBJECTREF_H
5#define QHARMONYJSOBJECTREF_H
7#include <QtCore/qglobal.h>
9#if defined(Q_QDOC) || defined(Q_OS_HARMONY)
11#include <QtCore/qcompare.h>
12#include <QtCore/qharmonyjscontext.h>
13#include <QtCore/qhashfunctions.h>
16#include <napi/native_api.h>
20class QHarmonyJsObjectRef;
21Q_CORE_EXPORT size_t qHash(
const QHarmonyJsObjectRef &key, size_t seed = 0)
noexcept;
23class Q_CORE_EXPORT QHarmonyJsObjectRef
26 QHarmonyJsObjectRef();
27 QHarmonyJsObjectRef(
const QHarmonyJsObjectRef &other);
28 QHarmonyJsObjectRef(QHarmonyJsObjectRef &&other)
noexcept;
29 QHarmonyJsObjectRef &operator=(
const QHarmonyJsObjectRef &other);
30 QHarmonyJsObjectRef &operator=(QHarmonyJsObjectRef &&other)
noexcept;
31 ~QHarmonyJsObjectRef();
33 static QHarmonyJsObjectRef fromValue(QHarmonyJsContext &jsContext, napi_value value);
35 napi_value value(QHarmonyJsContext &jsContext)
const;
39 friend Q_CORE_EXPORT
bool comparesEqual(
const QHarmonyJsObjectRef &lhs,
const QHarmonyJsObjectRef &rhs)
noexcept;
40 Q_DECLARE_EQUALITY_COMPARABLE(QHarmonyJsObjectRef)
41 friend Q_CORE_EXPORT size_t qHash(
const QHarmonyJsObjectRef &key, size_t seed)
noexcept;
43 std::int64_t identity()
const noexcept;
46 std::shared_ptr<Private> d;
49QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_CREF(QHarmonyJsObjectRef)
std::int64_t jsObjectIdentity(QOhosJsState &jsState, QNapi::Object object)
bool comparesEqual(const QFileInfo &lhs, const QFileInfo &rhs)
constexpr size_t qHash(const QSize &s, size_t seed=0) noexcept
QNapi::Reference< QNapi::Object > weakMap