Commit c300ff8f authored by Volker Krause's avatar Volker Krause
Browse files

Put the property wrappers into the internal namespace

Those are not meant to be used directly.
parent d82d756c
......@@ -17,9 +17,6 @@
namespace KAndroidExtras {
namespace Jni
{
/** Annotates a class for holding JNI property wrappers.
* This class has to provide a jniName() method, which is usually achieved by inheriting from
* a type defined by the @c JNI_TYPE or @c JNI_NESTED_TYPE macros.
......@@ -35,6 +32,7 @@ private: \
/** @cond internal */
namespace Internal {
/** Wrapper for static properties. */
template <typename PropType, typename ClassType, typename NameHolder, bool BasicType> struct StaticProperty {};
......@@ -146,7 +144,7 @@ public:
private: \
struct _jni_ ## name ## __NameHolder { static constexpr const char* jniName() { return "" #name; } }; \
public: \
static inline const Jni::StaticProperty<type, _jni_ThisType, _jni_ ## name ## __NameHolder, Jni::is_basic_type<type>::value> name;
static inline const KAndroidExtras::Internal::StaticProperty<type, _jni_ThisType, _jni_ ## name ## __NameHolder, Jni::is_basic_type<type>::value> name;
/**
* Wrap a member property.
......@@ -171,9 +169,9 @@ private: \
QT_WARNING_POP \
} \
}; \
friend class KAndroidExtras::Jni::PropertyBase<_jni_ThisType, _jni_ ## name ## __OffsetHolder>; \
friend class KAndroidExtras::Internal::PropertyBase<_jni_ThisType, _jni_ ## name ## __OffsetHolder>; \
public: \
[[no_unique_address]] Jni::Property<type, _jni_ThisType, _jni_ ## name ## __NameHolder, _jni_ ## name ## __OffsetHolder, Jni::is_basic_type<type>::value> name;
[[no_unique_address]] KAndroidExtras::Internal::Property<type, _jni_ThisType, _jni_ ## name ## __NameHolder, _jni_ ## name ## __OffsetHolder, Jni::is_basic_type<type>::value> name;
}
#endif // KANDROIDEXTRAS_JNIPROPERTIES_H
......@@ -7,6 +7,7 @@
#ifndef KANDROIDEXTRAS_JNITYPES_H
#define KANDROIDEXTRAS_JNITYPES_H
/** C++/Android integration utilities built on top of @c QAndroidJniObject. */
namespace KAndroidExtras {
///@cond internal
......@@ -61,6 +62,7 @@ namespace KAndroidExtras {
/** Macro to define a nested Java class with its corresponding JNI signature string. */
#define JNI_NESTED_TYPE(...) JNI_NESTED_TYPE_(PP_NARG(__VA_ARGS__), "", __VA_ARGS__)
/** Functions for interfacing with the Java Native Interface (JNI). */
namespace Jni
{
/** Returns the JNI type name of the given template argument. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment