Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QNapi Namespace Reference

Namespaces

namespace  details_qnapi_p_h

Classes

class  ExtendedCallbackFuncWrapper
class  ValueWrapper
class  Array
class  Object
class  PromiseWithContext
class  Promise
class  Reference
class  Reference< Object >
class  Reference< void >
class  CallbackInfo

Typedefs

using CallbackFuncWrapper = ExtendedCallbackFuncWrapper<>
using Value = Napi::Value
using Boolean = Napi::Boolean
using Number = Napi::Number
using BigInt = Napi::BigInt
using Date = Napi::Date
using String = Napi::String
using Symbol = Napi::Symbol
using ArrayBuffer = Napi::ArrayBuffer
using TypedArray = Napi::TypedArray
using Function = Napi::Function
using DataView = Napi::DataView
template<typename BufferT>
using Buffer = Napi::Buffer<BufferT>
template<typename ExternalT>
using External = Napi::External<ExternalT>
template<typename T>
using TypedArrayOf = Napi::TypedArrayOf<T>

Functions

std::vector< napi_value > unwrapValues (napi_env env, const std::vector< ValueWrapper > &wrappedValues)
Napi::Error makeLoggedException (napi_env env, const std::string &msg)
template<typename T>
bool valueTypeMatches (const Napi::Value &value)
template<typename Element>
bool arrayElementTypesMatch (const Napi::Value &value)
std::string getValueTypeString (const Napi::Value &value)
template<typename T, typename ValueDescriptionSupplier>
checkedCast (const Napi::Value &value, ValueDescriptionSupplier &&valueDescSupplier)
template<typename T>
checkedCast (const Napi::Value &value)
template<typename OutputContainer, typename Element, typename TransFunc>
OutputContainer getArrayElements (const Napi::Array &inputArray, TransFunc &&transFunc)
template<typename OutputContainer, typename Element>
OutputContainer getArrayElements (const Napi::Array &inputArray)
Object makeNewInstance (const Napi::Function &type, const std::vector< ValueWrapper > &args={})
Object makeNewInstance (const Napi::Object &baseObj, const std::string &typePath, const std::vector< ValueWrapper > &args={})
Napi::Value getPropOrUndefined (const Napi::Value &obj, const std::string &propName)
template<typename T>
Napi::Value getPropOrUndefined (const Napi::Reference< T > &objRef, const std::string &propName)
template<typename T>
std::enable_if_t< std::is_base_of< Napi::Value, T >::value, T > getOptionalPropOrEmpty (const Napi::Object &optObj, const std::string &propName, const std::string &objDesc={})
template<typename T>
std::enable_if_t< std::is_base_of< Napi::Value, T >::value, T > getOptionalPropOrEmpty (const Napi::Object &optObj, const Napi::Name &propName, const std::string &objDesc={})
Object makeObject (napi_env env, const std::vector< std::pair< std::string, ValueWrapper > > &namedValues={})
Array makeArray (napi_env env, const std::vector< ValueWrapper > &values={})
template<typename Result = Napi::Value, typename F>
Result runEscapingHandleScope (napi_env env, F &&func)
std::string toJsonString (const Napi::Value &value)

Typedef Documentation

◆ ArrayBuffer

using QNapi::ArrayBuffer = Napi::ArrayBuffer

Definition at line 74 of file qnapi_p.h.

◆ BigInt

using QNapi::BigInt = Napi::BigInt

Definition at line 66 of file qnapi_p.h.

◆ Boolean

using QNapi::Boolean = Napi::Boolean

Definition at line 62 of file qnapi_p.h.

◆ Buffer

template<typename BufferT>
using QNapi::Buffer = Napi::Buffer<BufferT>

Definition at line 83 of file qnapi_p.h.

◆ CallbackFuncWrapper

Definition at line 58 of file qnapi_p.h.

◆ DataView

using QNapi::DataView = Napi::DataView

Definition at line 80 of file qnapi_p.h.

◆ Date

using QNapi::Date = Napi::Date

Definition at line 68 of file qnapi_p.h.

◆ External

template<typename ExternalT>
using QNapi::External = Napi::External<ExternalT>

Definition at line 86 of file qnapi_p.h.

◆ Function

using QNapi::Function = Napi::Function

Definition at line 78 of file qnapi_p.h.

◆ Number

using QNapi::Number = Napi::Number

Definition at line 64 of file qnapi_p.h.

◆ String

using QNapi::String = Napi::String

Definition at line 70 of file qnapi_p.h.

◆ Symbol

using QNapi::Symbol = Napi::Symbol

Definition at line 72 of file qnapi_p.h.

◆ TypedArray

using QNapi::TypedArray = Napi::TypedArray

Definition at line 76 of file qnapi_p.h.

◆ TypedArrayOf

template<typename T>
using QNapi::TypedArrayOf = Napi::TypedArrayOf<T>

Definition at line 89 of file qnapi_p.h.

◆ Value

using QNapi::Value = Napi::Value

Definition at line 60 of file qnapi_p.h.

Function Documentation

◆ arrayElementTypesMatch()

template<typename Element>
bool QNapi::arrayElementTypesMatch ( const Napi::Value & value)

Definition at line 1216 of file qnapi_p.h.

◆ checkedCast() [1/2]

template<typename T>
T QNapi::checkedCast ( const Napi::Value & value)

Definition at line 1248 of file qnapi_p.h.

◆ checkedCast() [2/2]

template<typename T, typename ValueDescriptionSupplier>
T QNapi::checkedCast ( const Napi::Value & value,
ValueDescriptionSupplier && valueDescSupplier )

Definition at line 1241 of file qnapi_p.h.

◆ getArrayElements() [1/2]

template<typename OutputContainer, typename Element>
OutputContainer QNapi::getArrayElements ( const Napi::Array & inputArray)

Definition at line 1281 of file qnapi_p.h.

◆ getArrayElements() [2/2]

template<typename OutputContainer, typename Element, typename TransFunc>
OutputContainer QNapi::getArrayElements ( const Napi::Array & inputArray,
TransFunc && transFunc )

Definition at line 1258 of file qnapi_p.h.

◆ getOptionalPropOrEmpty() [1/2]

template<typename T>
std::enable_if_t< std::is_base_of< Napi::Value, T >::value, T > QNapi::getOptionalPropOrEmpty ( const Napi::Object & optObj,
const Napi::Name & propName,
const std::string & objDesc = {} )

Definition at line 1334 of file qnapi_p.h.

◆ getOptionalPropOrEmpty() [2/2]

template<typename T>
std::enable_if_t< std::is_base_of< Napi::Value, T >::value, T > QNapi::getOptionalPropOrEmpty ( const Napi::Object & optObj,
const std::string & propName,
const std::string & objDesc = {} )

Definition at line 1324 of file qnapi_p.h.

◆ getPropOrUndefined() [1/2]

template<typename T>
Napi::Value QNapi::getPropOrUndefined ( const Napi::Reference< T > & objRef,
const std::string & propName )

Definition at line 1313 of file qnapi_p.h.

◆ getPropOrUndefined() [2/2]

Napi::Value QNapi::getPropOrUndefined ( const Napi::Value & obj,
const std::string & propName )
inline

Definition at line 1300 of file qnapi_p.h.

◆ getValueTypeString()

std::string QNapi::getValueTypeString ( const Napi::Value & value)
inline

Definition at line 1235 of file qnapi_p.h.

◆ makeArray()

Array QNapi::makeArray ( napi_env env,
const std::vector< ValueWrapper > & values = {} )
inline

Definition at line 1346 of file qnapi_p.h.

◆ makeLoggedException()

Napi::Error QNapi::makeLoggedException ( napi_env env,
const std::string & msg )
inline

Definition at line 1204 of file qnapi_p.h.

◆ makeNewInstance() [1/2]

Object QNapi::makeNewInstance ( const Napi::Function & type,
const std::vector< ValueWrapper > & args = {} )
inline

Definition at line 1290 of file qnapi_p.h.

◆ makeNewInstance() [2/2]

Object QNapi::makeNewInstance ( const Napi::Object & baseObj,
const std::string & typePath,
const std::vector< ValueWrapper > & args = {} )
inline

Definition at line 1295 of file qnapi_p.h.

◆ makeObject()

Object QNapi::makeObject ( napi_env env,
const std::vector< std::pair< std::string, ValueWrapper > > & namedValues = {} )
inline

Definition at line 1339 of file qnapi_p.h.

◆ runEscapingHandleScope()

template<typename Result = Napi::Value, typename F>
Result QNapi::runEscapingHandleScope ( napi_env env,
F && func )

Definition at line 1359 of file qnapi_p.h.

◆ toJsonString()

std::string QNapi::toJsonString ( const Napi::Value & value)
inline

Definition at line 1364 of file qnapi_p.h.

◆ unwrapValues()

std::vector< napi_value > QNapi::unwrapValues ( napi_env env,
const std::vector< ValueWrapper > & wrappedValues )
inline

Definition at line 1192 of file qnapi_p.h.

◆ valueTypeMatches()

template<typename T>
bool QNapi::valueTypeMatches ( const Napi::Value & value)

Definition at line 1210 of file qnapi_p.h.