![]() |
NEURON
|
#include <nrnpython.h>#include <structmember.h>#include <InterViews/resource.h>#include <nrnoc2iv.h>#include <ocjump.h>#include "ivocvect.h"#include "oclist.h"#include "ocfile.h"#include <cstdint>#include "nrniv_mf.h"#include "nrnpy_utils.h"#include "../nrniv/shapeplt.h"#include <vector>#include "parse.hpp"#include <hoccontext.h>#include "nrnpy_hoc.h"Go to the source code of this file.
Classes | |
| struct | NPySecObj |
| struct | PyHocObject |
Macros | |
| #define | BYTEHEADER |
| #define | BYTESWAP(_X__, _TYPE__) |
Functions | |
| void | lvappendsec_and_ref (void *sl, Section *sec) |
| Section * | nrn_noerr_access () |
| void | hoc_pushs (Symbol *) |
| double * | hoc_evalpointer () |
| double | cable_prop_eval (Symbol *sym) |
| void | nrn_change_nseg (Section *, int) |
| void | hoc_push_string () |
| char ** | hoc_strpop () |
| void | hoc_objectvar () |
| Object * | hoc_newobj1 (Symbol *, int) |
| int | ivoc_list_count (Object *) |
| Object ** | hoc_objpop () |
| Object * | hoc_obj_look_inside_stack (int) |
| void | hoc_object_component () |
| int | hoc_stack_type () |
| void | hoc_call () |
| void | hoc_tobj_unref (Object **) |
| void | hoc_unref_defer () |
| void | sec_access_push () |
| PyObject * | nrnpy_pushsec (PyObject *) |
| bool | hoc_valid_stmt (const char *, Object *) |
| PyObject * | nrnpy_nrn () |
| PyObject * | nrnpy_cas (PyObject *, PyObject *) |
| PyObject * | nrnpy_forall (PyObject *, PyObject *) |
| PyObject * | nrnpy_newsecobj (PyObject *, PyObject *, PyObject *) |
| int | nrn_secref_nchild (Section *) |
| PyObject * | nrnpy_hoc2pyobject (Object *) |
| PyObject * | nrnpy_ho2po (Object *) |
| Object * | nrnpy_po2ho (PyObject *) |
| Object * | nrnpy_pyobject_in_obj (PyObject *) |
| static void | pyobject_in_objptr (Object **, PyObject *) |
| int | nrnpy_set_vec_as_numpy (PyObject *(*p)(int, double *)) |
| int | nrnpy_set_gui_callback (PyObject *) |
| double ** | nrnpy_setpointer_helper (PyObject *, PyObject *) |
| Symbol * | ivoc_alias_lookup (const char *name, Object *ob) |
| int | nrn_netcon_weight (NetCon *, double **) |
| int | nrn_matrix_dim (void *, int) |
| NPySecObj * | newpysechelp (Section *sec) |
| static void | add2topdict (PyObject *) |
| static PyObject * | cpp2refstr (char **cpp) |
| static PyObject * | hocobj_call (PyHocObject *self, PyObject *args, PyObject *kwrds) |
| static PyObject * | nrnexec (PyObject *self, PyObject *args) |
| static PyObject * | hoc_ac (PyObject *self, PyObject *args) |
| static void | hocobj_dealloc (PyHocObject *self) |
| static PyObject * | hocobj_new (PyTypeObject *subtype, PyObject *args, PyObject *kwds) |
| static int | hocobj_init (PyObject *subself, PyObject *args, PyObject *kwds) |
| static PyObject * | hocobj_name (PyObject *pself, PyObject *args) |
| static PyObject * | hocobj_repr (PyObject *p) |
| static Inst * | save_pc (Inst *newpc) |
| static int | hocobj_pushargs (PyObject *args, std::vector< char *> &s2free) |
| static void | hocobj_pushargs_free_strings (std::vector< char *> &s2free) |
| static Symbol * | getsym (char *name, Object *ho, int fail) |
| static int | component (PyHocObject *po) |
| int | nrnpy_numbercheck (PyObject *po) |
| PyObject * | nrnpy_hoc_pop () |
| static int | set_final_from_stk (PyObject *po) |
| static void * | nrnpy_hoc_int_pop () |
| static void * | nrnpy_hoc_bool_pop () |
| static void * | fcall (void *vself, void *vargs) |
| PyObject * | hocobj_call_arg (int i) |
| static Arrayinfo * | hocobj_aray (Symbol *sym, Object *ho) |
| static PyHocObject * | intermediate (PyHocObject *po, Symbol *sym, int ix) |
| static void | hocobj_pushtop (PyHocObject *po, Symbol *sym, int ix) |
| static void | hocobj_objectvar (Symbol *sym) |
| static PyObject * | hocobj_getsec (Symbol *sym) |
| static void | eval_component (PyHocObject *po, int ix) |
| PyObject * | nrn_hocobj_ptr (double *pd) |
| int | nrn_is_hocobj_ptr (PyObject *po, double *&pd) |
| static void | symlist2dict (Symlist *sl, PyObject *dict) |
| static int | setup_doc_system () |
| PyObject * | toplevel_get (PyObject *subself, const char *n) |
| static PyObject * | hocobj_getattr (PyObject *subself, PyObject *pyname) |
| static PyObject * | hocobj_baseattr (PyObject *subself, PyObject *args) |
| static PyObject * | hocobj_getattro (PyObject *subself, PyObject *name) |
| static int | hocobj_setattro (PyObject *subself, PyObject *pyname, PyObject *value) |
| static int | araylen (Arrayinfo *a, PyHocObject *po) |
| static int | araychk (Arrayinfo *a, PyHocObject *po, int ix) |
| static Py_ssize_t | hocobj_len (PyObject *self) |
| static int | hocobj_nonzero (PyObject *self) |
| static PyObject * | hocobj_iter (PyObject *self) |
| static hoc_Item * | next_valid_secitem (hoc_Item *q, hoc_Item *ql) |
| static PyObject * | iternext_sl (PyHocObject *po, hoc_Item *ql) |
| static PyObject * | hocobj_iternext (PyObject *self) |
| static PyObject * | hocobj_getitem (PyObject *self, Py_ssize_t ix) |
| static int | hocobj_setitem (PyObject *self, Py_ssize_t i, PyObject *arg) |
| static PyObject * | mkref (PyObject *self, PyObject *args) |
| static PyObject * | setpointer (PyObject *self, PyObject *args) |
| static PyObject * | hocobj_vptr (PyObject *pself, PyObject *args) |
| static long | hocobj_hash (PyHocObject *self) |
| PyObject * | nrn_ptr_richcmp (void *self_ptr, void *other_ptr, int op) |
| static PyObject * | hocobj_richcmp (PyHocObject *self, PyObject *other, int op) |
| static PyObject * | hocobj_same (PyHocObject *pself, PyObject *args) |
| static char * | double_array_interface (PyObject *po, long &stride) |
| static IvocVect * | nrnpy_vec_from_python (void *v) |
| static void | nrnpy_store_savestate_ (char **save_data, uint64_t *save_data_size) |
| static void | nrnpy_restore_savestate_ (int64_t size, char *data) |
| int | nrnpy_set_toplevel_callbacks (PyObject *rvp_plot0, PyObject *plotshape_plot0, PyObject *get_mech_object_0, PyObject *store_savestate, PyObject *restore_savestate) |
| static double | object_to_double_ (Object *obj) |
| static void * | nrnpy_get_pyobj_ (Object *obj) |
| static void | nrnpy_decref_ (void *pyobj) |
| static PyObject * | gui_helper_3_helper_ (const char *name, Object *obj, int handle_strptr) |
| static Object ** | gui_helper_3_ (const char *name, Object *obj, int handle_strptr) |
| static char ** | gui_helper_3_str_ (const char *name, Object *obj, int handle_strptr) |
| static Object ** | gui_helper_ (const char *name, Object *obj) |
| static Object ** | vec_as_numpy_helper (int size, double *data) |
| static Object ** | nrnpy_vec_to_python (void *v) |
| static Object * | rvp_rxd_to_callable_ (Object *obj) |
| PyObject * | get_plotshape_data (PyObject *sp) |
| static PyObject * | hocpickle_reduce (PyObject *self, PyObject *args) |
| static PyObject * | hocpickle_setstate (PyObject *self, PyObject *args) |
| static PyObject * | libpython_path (PyObject *self, PyObject *args) |
| int | nrnpy_vec_math_register (PyObject *callback) |
| int | nrnpy_rvp_pyobj_callback_register (PyObject *callback) |
| static bool | pyobj_is_vector (PyObject *obj) |
| static PyObject * | py_hocobj_math (const char *op, PyObject *obj1, PyObject *obj2) |
| static PyObject * | py_hocobj_math_unary (const char *op, PyObject *obj) |
| static PyObject * | py_hocobj_add (PyObject *obj1, PyObject *obj2) |
| static PyObject * | py_hocobj_uabs (PyObject *obj) |
| static PyObject * | py_hocobj_uneg (PyObject *obj) |
| static PyObject * | py_hocobj_upos (PyObject *obj) |
| static PyObject * | py_hocobj_sub (PyObject *obj1, PyObject *obj2) |
| static PyObject * | py_hocobj_mul (PyObject *obj1, PyObject *obj2) |
| static PyObject * | py_hocobj_div (PyObject *obj1, PyObject *obj2) |
| char | get_endian_character () |
| static void | sectionlist_helper_ (void *sl, Object *args) |
| static int | get_nrncore_opt_value (const char *option) |
| static int | nrncore_enable_value () |
| return value of neuron.coreneuron.enable More... | |
| static int | nrncore_file_mode_value () |
| return value of neuron.coreneuron.file_mode More... | |
| static char * | nrncore_arg (double tstop) |
| PyObject * | nrnpy_hoc () |
| #define BYTEHEADER |
Definition at line 2700 of file nrnpy_hoc.cpp.
| #define BYTESWAP | ( | _X__, | |
| _TYPE__ | |||
| ) |
Definition at line 2705 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2824 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1525 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1504 of file nrnpy_hoc.cpp.
| double cable_prop_eval | ( | Symbol * | sym | ) |
Definition at line 1518 of file cabcode.cpp.
|
static |
Definition at line 448 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2021 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2222 of file nrnpy_hoc.cpp.
|
static |
Definition at line 873 of file nrnpy_hoc.cpp.
Definition at line 650 of file nrnpy_hoc.cpp.
| char get_endian_character | ( | ) |
Definition at line 2923 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2999 of file nrnpy_hoc.cpp.
| PyObject* get_plotshape_data | ( | PyObject * | sp | ) |
Definition at line 2609 of file nrnpy_hoc.cpp.
Definition at line 419 of file nrnpy_hoc.cpp.
Definition at line 2511 of file nrnpy_hoc.cpp.
Definition at line 2483 of file nrnpy_hoc.cpp.
Definition at line 2419 of file nrnpy_hoc.cpp.
Definition at line 2497 of file nrnpy_hoc.cpp.
|
static |
Definition at line 175 of file nrnpy_hoc.cpp.
| void hoc_call | ( | ) |
Definition at line 576 of file hoc_oop.cpp.
| void hoc_object_component | ( | ) |
Definition at line 1032 of file hoc_oop.cpp.
| void hoc_objectvar | ( | ) |
Definition at line 888 of file hoc_oop.cpp.
| bool hoc_valid_stmt | ( | const char * | , |
| Object * | |||
| ) |
Definition at line 35 of file ocjump.cpp.
Definition at line 789 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1285 of file nrnpy_hoc.cpp.
|
static |
Definition at line 711 of file nrnpy_hoc.cpp.
| PyObject* hocobj_call_arg | ( | int | i | ) |
Definition at line 707 of file nrnpy_hoc.cpp.
|
static |
Definition at line 186 of file nrnpy_hoc.cpp.
|
static |
Definition at line 956 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1294 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1763 of file nrnpy_hoc.cpp.
|
static |
Definition at line 861 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2102 of file nrnpy_hoc.cpp.
|
static |
Definition at line 263 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1594 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1738 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1539 of file nrnpy_hoc.cpp.
|
static |
Definition at line 289 of file nrnpy_hoc.cpp.
|
static |
Definition at line 212 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1566 of file nrnpy_hoc.cpp.
Definition at line 853 of file nrnpy_hoc.cpp.
|
static |
Definition at line 341 of file nrnpy_hoc.cpp.
|
static |
Definition at line 409 of file nrnpy_hoc.cpp.
|
static |
Definition at line 838 of file nrnpy_hoc.cpp.
|
static |
Definition at line 333 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2133 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2209 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1312 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1888 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2090 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2638 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2714 of file nrnpy_hoc.cpp.
|
static |
Definition at line 811 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1642 of file nrnpy_hoc.cpp.
Definition at line 103 of file strfun.cpp.
Definition at line 414 of file oclist.cpp.
|
static |
Definition at line 2777 of file nrnpy_hoc.cpp.
Definition at line 24 of file seclist.cpp.
|
static |
Definition at line 1989 of file nrnpy_hoc.cpp.
Definition at line 871 of file nrnpy_nrn.cpp.
Definition at line 1627 of file nrnpy_hoc.cpp.
Definition at line 1561 of file cabcode.cpp.
| PyObject* nrn_hocobj_ptr | ( | double * | pd | ) |
Definition at line 881 of file nrnpy_hoc.cpp.
| int nrn_is_hocobj_ptr | ( | PyObject * | po, |
| double *& | pd | ||
| ) |
Definition at line 889 of file nrnpy_hoc.cpp.
Definition at line 27 of file ocmatrix.cpp.
Definition at line 137 of file netcvode.cpp.
| Section* nrn_noerr_access | ( | ) |
Definition at line 464 of file cabcode.cpp.
Definition at line 2104 of file nrnpy_hoc.cpp.
Definition at line 223 of file secref.cpp.
|
static |
Definition at line 3037 of file nrnpy_hoc.cpp.
|
static |
return value of neuron.coreneuron.enable
Definition at line 3022 of file nrnpy_hoc.cpp.
|
static |
return value of neuron.coreneuron.file_mode
Definition at line 3027 of file nrnpy_hoc.cpp.
|
static |
Definition at line 166 of file nrnpy_hoc.cpp.
| PyObject* nrnpy_cas | ( | PyObject * | , |
| PyObject * | |||
| ) |
Definition at line 2385 of file nrnpy_nrn.cpp.
Definition at line 2412 of file nrnpy_hoc.cpp.
| PyObject * nrnpy_forall | ( | PyObject * | self, |
| PyObject * | args | ||
| ) |
Definition at line 1585 of file nrnpy_hoc.cpp.
Definition at line 2404 of file nrnpy_hoc.cpp.
| PyObject* nrnpy_ho2po | ( | Object * | o | ) |
Definition at line 503 of file nrnpy_hoc.cpp.
| PyObject* nrnpy_hoc | ( | ) |
Definition at line 3069 of file nrnpy_hoc.cpp.
| PyObject * nrnpy_hoc2pyobject | ( | Object * | ho | ) |
Definition at line 191 of file nrnpy_p2h.cpp.
|
static |
Definition at line 646 of file nrnpy_hoc.cpp.
|
static |
Definition at line 642 of file nrnpy_hoc.cpp.
| PyObject* nrnpy_hoc_pop | ( | ) |
Definition at line 551 of file nrnpy_hoc.cpp.
| PyObject* nrnpy_newsecobj | ( | PyObject * | , |
| PyObject * | , | ||
| PyObject * | |||
| ) |
Definition at line 375 of file nrnpy_nrn.cpp.
| PyObject* nrnpy_nrn | ( | ) |
Definition at line 2417 of file nrnpy_nrn.cpp.
| int nrnpy_numbercheck | ( | PyObject * | po | ) |
Definition at line 478 of file nrnpy_hoc.cpp.
| Object* nrnpy_po2ho | ( | PyObject * | po | ) |
Definition at line 524 of file nrnpy_hoc.cpp.
| PyObject* nrnpy_pushsec | ( | PyObject * | ) |
Definition at line 1270 of file nrnpy_nrn.cpp.
| Object * nrnpy_pyobject_in_obj | ( | PyObject * | po | ) |
Definition at line 205 of file nrnpy_p2h.cpp.
|
static |
Definition at line 2357 of file nrnpy_hoc.cpp.
| int nrnpy_rvp_pyobj_callback_register | ( | PyObject * | callback | ) |
Definition at line 2846 of file nrnpy_hoc.cpp.
| int nrnpy_set_gui_callback | ( | PyObject * | new_gui_callback | ) |
Definition at line 2391 of file nrnpy_hoc.cpp.
| int nrnpy_set_toplevel_callbacks | ( | PyObject * | rvp_plot0, |
| PyObject * | plotshape_plot0, | ||
| PyObject * | get_mech_object_0, | ||
| PyObject * | store_savestate, | ||
| PyObject * | restore_savestate | ||
| ) |
Definition at line 2379 of file nrnpy_hoc.cpp.
Definition at line 2325 of file nrnpy_hoc.cpp.
| double** nrnpy_setpointer_helper | ( | PyObject * | , |
| PyObject * | |||
| ) |
Definition at line 2149 of file nrnpy_nrn.cpp.
Definition at line 2334 of file nrnpy_hoc.cpp.
Definition at line 2266 of file nrnpy_hoc.cpp.
| int nrnpy_vec_math_register | ( | PyObject * | callback | ) |
Definition at line 2841 of file nrnpy_hoc.cpp.
Definition at line 2529 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2396 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2890 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2914 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2864 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2881 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2910 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2906 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2894 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2898 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2902 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2851 of file nrnpy_hoc.cpp.
Definition at line 281 of file nrnpy_hoc.cpp.
Definition at line 2595 of file nrnpy_hoc.cpp.
Definition at line 335 of file nrnpy_hoc.cpp.
| void sec_access_push | ( | ) |
Definition at line 738 of file cabcode.cpp.
Definition at line 2956 of file nrnpy_hoc.cpp.
|
static |
Definition at line 587 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2042 of file nrnpy_hoc.cpp.
|
static |
Definition at line 917 of file nrnpy_hoc.cpp.
Definition at line 901 of file nrnpy_hoc.cpp.
| PyObject* toplevel_get | ( | PyObject * | subself, |
| const char * | n | ||
| ) |
Definition at line 939 of file nrnpy_hoc.cpp.
Definition at line 2515 of file nrnpy_hoc.cpp.
|
static |
Definition at line 112 of file nrnpy_hoc.cpp.
|
static |
Definition at line 705 of file nrnpy_hoc.cpp.
|
static |
Definition at line 159 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2390 of file nrnpy_hoc.cpp.
| Symlist* hoc_built_in_symlist |
Definition at line 39 of file symbol.cpp.
|
static |
Definition at line 103 of file nrnpy_hoc.cpp.
| int hoc_max_builtin_class_id |
Definition at line 52 of file hoc_oop.cpp.
| Inst* hoc_pc |
|
static |
Definition at line 104 of file nrnpy_hoc.cpp.
| Objectdata* hoc_top_level_data |
Definition at line 134 of file hoc_oop.cpp.
| Symlist* hoc_top_level_symlist |
Neuron/Java Interface code.
Modified by Michael Hines The Java to Neuron JNIEXPORT functions for Neuron.java have been collected in nrnjni.cpp. This file now mostly supports the Neuron to Java direction
Definition at line 41 of file symbol.cpp.
|
static |
Definition at line 102 of file nrnpy_hoc.cpp.
|
static |
Definition at line 180 of file nrnpy_hoc.cpp.
|
static |
Definition at line 124 of file nrnpy_hoc.cpp.
Definition at line 2917 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2797 of file nrnpy_hoc.cpp.
| PyTypeObject* hocobject_type |
Definition at line 162 of file nrnpy_hoc.cpp.
| Symbol* nrn_child_sym |
Definition at line 26 of file secref.cpp.
Definition at line 47 of file shapeplt.cpp.
Definition at line 46 of file shapeplt.cpp.
| char*(* nrnpy_nrncore_arg_p_) (double tstop) |
Gets the python string returned by neuron.coreneuron.nrncore_arg(tstop) return a strdup() copy of the string which should be free when the caller finishes with it.
Return NULL if error or bool(neuron.coreneuron.enable) is False.
Definition at line 145 of file nrncore_write.cpp.
| int(* nrnpy_nrncore_enable_value_p_) () |
value of neuron.coreneuron.enable as 0, 1 (-1 if error)
Definition at line 142 of file nrncore_write.cpp.
| int(* nrnpy_nrncore_file_mode_value_p_) () |
value of neuron.coreneuron.file_mode as 0, 1 (-1 if error)
Definition at line 143 of file nrncore_write.cpp.
| Symbol* nrnpy_pyobj_sym_ |
| void(* nrnpy_restore_savestate) (int64_t, char *) |
Definition at line 31 of file savstate.cpp.
|
static |
Definition at line 160 of file nrnpy_hoc.cpp.
Definition at line 27 of file spaceplt.cpp.
Definition at line 22 of file seclist.cpp.
Definition at line 32 of file savstate.cpp.
Definition at line 125 of file ivocvect.cpp.
Definition at line 123 of file ivocvect.cpp.
|
static |
Definition at line 2839 of file nrnpy_hoc.cpp.
Definition at line 124 of file ivocvect.cpp.
|
static |
Definition at line 116 of file nrnpy_hoc.cpp.
|
static |
Definition at line 157 of file nrnpy_hoc.cpp.
| PyObject* pmech_types |
Definition at line 88 of file nrnpy_nrn.cpp.
| PyTypeObject* psection_type |
Definition at line 79 of file nrnpy_nrn.cpp.
| PyObject* rangevars_ |
Definition at line 89 of file nrnpy_nrn.cpp.
|
static |
Definition at line 1293 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2331 of file nrnpy_hoc.cpp.
|
static |
Definition at line 156 of file nrnpy_hoc.cpp.
| int section_object_seen |
|
static |
Definition at line 2330 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1501 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1502 of file nrnpy_hoc.cpp.
|
static |
Definition at line 1500 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2810 of file nrnpy_hoc.cpp.
|
static |
Definition at line 121 of file nrnpy_hoc.cpp.
|
static |
Definition at line 2324 of file nrnpy_hoc.cpp.