10 template <
class E,
class Enable >
14 class Array< E,
std::enable_if_t<IsPrimitive<E>::value> > :
public Object< ArrayTag<E> >
22 explicit Array(std::nullptr_t =
nullptr)
50 template <
class Array >
56 template <
class Array >
68 template <
class TheTag >
79 explicit Array(std::nullptr_t =
nullptr)
136 GetArrayRegion(env, *array, 0, result.size(),
reinterpret_cast<jbyte*
>(&result[0]));
144 SetArrayRegion(env, *result, 0,
string.size(), reinterpret_cast<const jbyte*>(&
string[0]));
Array(std::nullptr_t=nullptr)
Definition: array.hpp:22
decltype(Untag(std::declval< T >())) UntaggedType
Definition: tagging.hpp:130
E ElementType
Definition: array.hpp:19
UntaggedType * get() const
Definition: object.hpp:63
T & SafeDereference(JNIEnv &env, T *ptr, const char *message=nullptr)
Definition: npe.hpp:19
jsize Length(JNIEnv &env) const
Definition: array.hpp:33
void SetArrayRegion(JNIEnv &env, jarray< T > &array, jsize start, jsize len, const T *buf)
Definition: functions.hpp:539
void SetObjectArrayElement(JNIEnv &env, jarray< jobject > &array, jsize index, jobject *value)
Definition: functions.hpp:565
void GetArrayRegion(JNIEnv &env, jarray< T > &array, jsize start, jsize len, T *buf)
Definition: functions.hpp:525
jarray< jobject > & NewObjectArray(JNIEnv &env, jsize length, jclass &elementClass, jobject *initialElement=nullptr)
Definition: functions.hpp:553
void GetRegion(JNIEnv &env, jsize start, Array &buf) const
Definition: array.hpp:51
jobject * GetObjectArrayElement(JNIEnv &env, jarray< jobject > &array, jsize index)
Definition: functions.hpp:559
Definition: object.hpp:44
static Local< Array< Object< TheTag > > > New(JNIEnv &env, jsize length, const Object< TheTag > *initialElement=nullptr)
Definition: array.hpp:107
Definition: advanced_ownership.hpp:5
void Set(JNIEnv &env, jsize index, const ElementType &value)
Definition: array.hpp:102
std::size_t jsize
Definition: types.hpp:28
typename SuperType::UntaggedType UntaggedType
Definition: array.hpp:73
auto Untag(T primitive) -> std::enable_if_t< IsPrimitive< T >::value, T >
Definition: tagging.hpp:116
void SetRegion(JNIEnv &env, jsize start, const Array &buf)
Definition: array.hpp:57
typename ElementType::UntaggedType UntaggedElementType
Definition: array.hpp:76
Definition: unique.hpp:38
TheTag TagType
Definition: array.hpp:74
Local< ElementType > Get(JNIEnv &env, jsize index) const
Definition: array.hpp:95
static Local< Array< E > > New(JNIEnv &env, jsize length)
Definition: array.hpp:62
jsize GetArrayLength(JNIEnv &env, jarray< E > &array)
Definition: functions.hpp:465
typename SuperType::UntaggedType UntaggedType
Definition: array.hpp:18
std::vector< T > MakeAnything(ThingToMake< std::vector< T >>, JNIEnv &env, const Array< T > &array)
Definition: array.hpp:114
ElementType Get(JNIEnv &env, jsize index) const
Definition: array.hpp:38
Array(UntaggedType *p)
Definition: array.hpp:82
void Set(JNIEnv &env, jsize index, const ElementType &value)
Definition: array.hpp:45
Array(std::nullptr_t=nullptr)
Definition: array.hpp:79
Array(UntaggedType *p)
Definition: array.hpp:25
jsize Length(JNIEnv &env) const
Definition: array.hpp:90
void NullCheck(JNIEnv &env, T *ptr, const char *message=nullptr)
Definition: npe.hpp:13