void OcPointer_reg() { class2oc("Pointer", cons, destruct, members, NULL, NULL, s_memb); // now make the val variable an actual double Symbol* sv = hoc_lookup("Pointer"); Symbol* sx = hoc_table_lookup("val", sv->u.ctemplate->symtable); sx->type = VAR; sx->arayinfo = NULL; sv->u.ctemplate->steer = steer_val; }
void StateTransitionEvent_reg() { class2oc("StateTransitionEvent", ste_cons, ste_destruct, members, NULL, NULL, NULL); }
void Cvode_reg() { class2oc("CVode", cons, destruct, members, NULL, omembers, NULL); net_cvode_instance = new NetCvode(1); Daspk::dteps_ = 1e-9; // change with cvode.dae_init_dteps(newval) }
void Random_reg() { class2oc("Random", r_cons, r_destruct, r_members); random_play_list_ = new RandomPlayList(); }
void LinearMechanism_reg() { class2oc("LinearMechanism", cons, destruct, members, NULL, NULL, NULL); }
void A_reg() { class2oc("A", A_constructor, A_destructor, A_member_func); }
// called from njvm.cpp when the first NrnJava hoc object is consstructed void nrnjava_init () { // printf("nrnjava_init\n"); nrn_jclass_symlist = new NJSymList(20); class2oc("JavaObject", joconstruct, jodestruct, jo_members, nil, nil, jo_retstr_members); nrn_jobj_sym = hoc_lookup("JavaObject"); nrn_vec_sym = hoc_lookup("Vector"); #if defined(_MSWIN) || (defined(MAC) && !defined(DARWIN)) neuronCls = nrnjava_env->FindClass("neuron/Redirect"); if (neuronCls == 0) { printf("ERROR in nrnjava_init : neuron/Redirect class not loaded\n"); printf("Look in the Redirect.out file of the current working directory for the reason for failure\n"); return; } nrnjni_redirreg(neuronCls); #endif nrnclsldr = nrnjava_env->FindClass("neuron/NrnClassLoader"); if (nrnclsldr == 0) { printf("ERROR in nrnjava_init : neuron/NrnClassLoader not found\n"); } nrnclsldID = nrnjava_env->GetStaticMethodID(nrnclsldr, "load", "(Ljava/lang/String;)Ljava/lang/Class;" ); jstring js; js = nrnjava_env->NewStringUTF("neuron.Neuron"); neuronCls = (jclass)nrnjava_env->CallStaticObjectMethod(nrnclsldr, nrnclsldID,js); if (neuronCls == 0) { printf("ERROR in nrnjava_init : neuron.Neuron class not found\n"); return; } js = nrnjava_env->NewStringUTF("neuron.HocObject"); jclass hoCls = (jclass)nrnjava_env->CallStaticObjectMethod(nrnclsldr, nrnclsldID,js); if (hoCls == 0) { printf("ERROR in nrnjava_init : neuron.HocObject class not found\n"); return; } p_java2nrn_cons = java2nrn_cons; p_java2nrn_destruct = java2nrn_destruct; p_java2nrn_dmeth = java2nrn_dmeth; p_java2nrn_smeth = java2nrn_smeth; p_java2nrn_ometh = java2nrn_ometh; p_java2nrn_classname = java2nrn_classname; p_java2nrn_identity = java2nrn_identity; nrnjava_pwm_setwin = pwm_setwin; nrnjni_registration(neuronCls); /*** Lookup method ids of Java Neuron class ***/ constructNoArgID = nrnjava_env->GetStaticMethodID( neuronCls, "constructNoArg", "(I)Ljava/lang/Object;" ); constructWithArgID = nrnjava_env->GetStaticMethodID( neuronCls, "constructWithArg", "(I)Ljava/lang/Object;" ); makeHocClassID = nrnjava_env->GetStaticMethodID( neuronCls, "makeHocClass", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I" ); invokeDoubleMethodID = nrnjava_env->GetStaticMethodID( neuronCls, "invokeDoubleMethod", "(Ljava/lang/Object;III)D" ); invokeCharsMethodID = nrnjava_env->GetStaticMethodID( neuronCls, "invokeCharsMethod", "(Ljava/lang/Object;III)Ljava/lang/String;" ); invokeObjectMethodID = nrnjava_env->GetStaticMethodID( neuronCls, "invokeObjectMethod", "(Ljava/lang/Object;III)Ljava/lang/Object;" ); encapsulateID = nrnjava_env->GetStaticMethodID( neuronCls, "encapsulateHocObject", "(JI)Ljava/lang/Object;" ); getObjectTypeID = nrnjava_env->GetStaticMethodID( neuronCls, "getObjectType", "(Ljava/lang/Object;)I" ); setwinID = nrnjava_env->GetStaticMethodID( neuronCls, "setwin", "(JIII)I"); identityID = nrnjava_env->GetStaticMethodID( neuronCls, "identity", "(Ljava/lang/Object;Ljava/lang/Object;)I" ); jclassnameID = nrnjava_env->GetStaticMethodID( neuronCls, "javaClassName", "(Ljava/lang/Object;)Ljava/lang/String;" ); hocObjectCastID = nrnjava_env->GetFieldID( hoCls, "hocObjectCast", "J"); // printf("neuronCls=%ld mids %ld %ld %ld\n", // neuronCls, constructNoArgID, // makeHocClassID, invokeDoubleMethodID); }
void TQueue_reg() { class2oc("TQueue", cons, destruct, members); }
void SymChooser_reg() { class2oc("SymChooser", scons, sdestruct, members); }
void FInitializeHandler_reg() { class2oc("FInitializeHandler", finithnd_cons, finithnd_destruct, members, NULL, NULL, NULL); }
void NrnDAQ_reg() { class2oc("NrnDAQ", cons, destruct, members); }