jobject makeCounterValueString(JNIEnv *env, const char* value, int len) { jclass clazz = env->FindClass("com/ixora/rms/data/CounterValueString"); jmethodID ctor = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;)V"); // Convert to unicode, using a self-cleaning buffer a2w objValue(value, len); wchar_t* wszValue = objValue.wget(); return env->NewObject(clazz, ctor, env->NewString((const jchar*)wszValue, len)); }
void BuiltinField::setChar(const Object& obj, char value) const { Object objValue(value, false); set(obj, objValue); }
void BuiltinField::setBool(const Object& obj, bool value) const { Object objValue(value, false); set(obj, objValue); }
void StringField::setString(const Object& obj, const std::string& value) const { Object objValue(value, false); set(obj, objValue); }
void BuiltinField::setDouble(const Object& obj, double value) const { Object objValue(value, false); set(obj, objValue); }
void BuiltinField::setFloat(const Object& obj, float value) const { Object objValue(value, false); set(obj, objValue); }
void BuiltinField::setInt(const Object& obj, int value) const { Object objValue(value, false); set(obj, objValue); }