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]));
void GetRegion(JNIEnv &env, jsize start, Array &buf) const
Definition: array.hpp:51
E ElementType
Definition: array.hpp:19
void SetRegion(JNIEnv &env, jsize start, const Array &buf)
Definition: array.hpp:57
Array & operator=(const Array &)=delete
Array(const Array &)=delete
ElementType Get(JNIEnv &env, jsize index) const
Definition: array.hpp:38
typename SuperType::UntaggedType UntaggedType
Definition: array.hpp:18
Array(UntaggedType *p)
Definition: array.hpp:25
jsize Length(JNIEnv &env) const
Definition: array.hpp:33
static Local< Array< E > > New(JNIEnv &env, jsize length)
Definition: array.hpp:62
Array(std::nullptr_t=nullptr)
Definition: array.hpp:22
void Set(JNIEnv &env, jsize index, const ElementType &value)
Definition: array.hpp:45
void Set(JNIEnv &env, jsize index, const ElementType &value)
Definition: array.hpp:102
Local< ElementType > Get(JNIEnv &env, jsize index) const
Definition: array.hpp:95
jsize Length(JNIEnv &env) const
Definition: array.hpp:90
Array & operator=(const Array &)=delete
TheTag TagType
Definition: array.hpp:74
typename ElementType::UntaggedType UntaggedElementType
Definition: array.hpp:76
Array(UntaggedType *p)
Definition: array.hpp:82
Array(const Array &)=delete
typename SuperType::UntaggedType UntaggedType
Definition: array.hpp:73
static Local< Array< Object< TheTag > > > New(JNIEnv &env, jsize length, const Object< TheTag > *initialElement=nullptr)
Definition: array.hpp:107
Array(std::nullptr_t=nullptr)
Definition: array.hpp:79
Definition: object.hpp:45
UntaggedType * get() const
Definition: object.hpp:63
Definition: unique.hpp:39
Definition: advanced_ownership.hpp:6
jsize GetArrayLength(JNIEnv &env, jarray< E > &array)
Definition: functions.hpp:465
void SetArrayRegion(JNIEnv &env, jarray< T > &array, jsize start, jsize len, const T *buf)
Definition: functions.hpp:539
jobject * GetObjectArrayElement(JNIEnv &env, jarray< jobject > &array, jsize index)
Definition: functions.hpp:559
decltype(Untag(std::declval< T >())) UntaggedType
Definition: tagging.hpp:130
T & SafeDereference(JNIEnv &env, T *ptr, const char *message=nullptr)
Definition: npe.hpp:19
std::vector< T > MakeAnything(ThingToMake< std::vector< T >>, JNIEnv &env, const Array< T > &array)
Definition: array.hpp:114
void SetObjectArrayElement(JNIEnv &env, jarray< jobject > &array, jsize index, jobject *value)
Definition: functions.hpp:565
jarray< jobject > & NewObjectArray(JNIEnv &env, jsize length, jclass &elementClass, jobject *initialElement=nullptr)
Definition: functions.hpp:553
void NullCheck(JNIEnv &env, T *ptr, const char *message=nullptr)
Definition: npe.hpp:13
std::size_t jsize
Definition: types.hpp:28
void GetArrayRegion(JNIEnv &env, jarray< T > &array, jsize start, jsize len, T *buf)
Definition: functions.hpp:525
auto Untag(T primitive) -> std::enable_if_t< IsPrimitive< T >::value, T >
Definition: tagging.hpp:116
Definition: errors.hpp:10