NEURON
nrnpy_hoc.cpp File Reference
#include "cabcode.h"
#include "../oc/code.h"
#include "ivocvect.h"
#include "neuron/container/data_handle.hpp"
#include "neuron/unique_cstr.hpp"
#include "nrniv_mf.h"
#include "nrn_pyhocobject.h"
#include "nrnoc2iv.h"
#include "nrnpy.h"
#include "nrnpy_utils.h"
#include "nrnpython.h"
#include "convert_cxx_exceptions.hpp"
#include "nrnwrap_dlfcn.h"
#include "ocfile.h"
#include "ocjump.h"
#include "oclist.h"
#include "shapeplt.h"
#include "seclist.h"
#include <cstdint>
#include <vector>
#include <sstream>
#include <unordered_map>
#include <nanobind/nanobind.h>
#include "parse.hpp"
#include "hoccontext.h"
#include "nrnpy_hoc.h"

Go to the source code of this file.

Classes

struct  hocclass
 

Macros

#define BYTEHEADER
 
#define BYTESWAP(_X__, _TYPE__)
 

Functions

void hoc_pushs (Symbol *)
 
double cable_prop_eval (Symbol *sym)
 
void hoc_push_string ()
 
char ** hoc_strpop ()
 
void hoc_objectvar ()
 
Objecthoc_newobj1 (Symbol *, int)
 
int ivoc_list_count (Object *)
 
Object ** hoc_objpop ()
 Pop pointer to object pointer and return top elem from stack. More...
 
Objecthoc_obj_look_inside_stack (int)
 
void hoc_object_component ()
 
int hoc_stack_type ()
 Get the type of the top entry. More...
 
void hoc_call ()
 
void hoc_tobj_unref (Object **)
 
void hoc_unref_defer ()
 
void sec_access_push ()
 
bool hoc_valid_stmt (const char *, Object *)
 
PyObjectnrnpy_nrn ()
 
PyObjectnrnpy_cas (PyObject *, PyObject *)
 
PyObjectnrnpy_cas_safe (PyObject *, PyObject *)
 
PyObjectnrnpy_forall_safe (PyObject *, PyObject *)
 
PyObjectnrnpy_newsecobj_safe (PyObject *, PyObject *, PyObject *)
 
int nrn_secref_nchild (Section *)
 
static void pyobject_in_objptr (Object **, PyObject *)
 
static double nrnpy_call_func_ (Object *, double)
 
Symbolivoc_alias_lookup (const char *name, Object *ob)
 
int nrn_netcon_weight (NetCon *, double **)
 
int nrn_matrix_dim (void *, int)
 
static void add2topdict (PyObject *)
 
static PyObjectcpp2refstr (char **cpp)
 
static PyObjecthocobj_call (PyHocObject *self, PyObject *args, PyObject *kwrds)
 
static PyObjecthocclass_getattro (PyObject *self, PyObject *pyname)
 
static int hocclass_init (hocclass *cls, PyObject *args, PyObject *kwds)
 
static PyObjecthocclass_getitem (PyObject *self, Py_ssize_t ix)
 
bool nrn_chk_data_handle (const neuron::container::data_handle< double > &pd)
 
static int hoc_evalpointer_err ()
 if hoc_evalpointer calls hoc_execerror, return 1 More...
 
static PyObjectnrnexec (PyObject *self, PyObject *args)
 
static PyObjectnrnexec_safe (PyObject *self, PyObject *args)
 
static PyObjecthoc_ac (PyObject *self, PyObject *args)
 
static PyObjecthoc_ac_safe (PyObject *self, PyObject *args)
 
static void hocobj_dealloc (PyHocObject *self)
 
static PyObjecthocobj_new (PyTypeObject *subtype, PyObject *args, PyObject *kwds)
 
static int hocobj_init (PyObject *subself, PyObject *args, PyObject *kwds)
 
static PyObjecthocobj_name (PyObject *pself, PyObject *args)
 
static PyObjecthocobj_name_safe (PyObject *pself, PyObject *args)
 
static PyObjecthocobj_repr (PyObject *p)
 
static Instsave_pc (Inst *newpc)
 
int hocobj_pushargs (PyObject *args, std::vector< neuron::unique_cstr > &s2free)
 
static Symbolgetsym (char *name, Object *ho, int fail)
 
static HocReturnType component (PyHocObject *po)
 
int nrnpy_numbercheck (PyObject *po)
 
PyObjectnrnpy_ho2po (Object *o)
 
Objectnrnpy_po2ho (PyObject *po)
 
PyObjectnrnpy_hoc_pop (const char *mes)
 
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)
 
PyObjecthocobj_call_arg (int i)
 
static Arrayinfohocobj_aray (Symbol *sym, Object *ho)
 
static PyHocObjectintermediate (PyHocObject *po, Symbol *sym, int ix)
 
static void hocobj_pushtop (PyHocObject *po, Symbol *sym, int ix)
 
static int hocobj_objectvar (Symbol *sym)
 
static PyObjecthocobj_getsec (Symbol *sym)
 
static void eval_component (PyHocObject *po, int ix)
 
PyObjectnrn_hocobj_handle (neuron::container::data_handle< double > d)
 
NRN_EXPORT PyObjectnrn_hocobj_ptr (double *pd)
 
int nrn_is_hocobj_ptr (PyObject *po, neuron::container::data_handle< double > &pd)
 
static void symlist2dict (Symlist *sl, PyObject *dict)
 
static int setup_doc_system ()
 
PyObjecttoplevel_get (PyObject *subself, const char *n)
 
static PyObjecthocobj_getattr (PyObject *subself, PyObject *pyname)
 
static PyObjecthocobj_baseattr (PyObject *subself, PyObject *args)
 
static PyObjecthocobj_baseattr_safe (PyObject *subself, PyObject *args)
 
static PyObjecthocobj_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 seclist_count (Object *ho)
 
static Py_ssize_t hocobj_len (PyObject *self)
 
static int hocobj_nonzero (PyObject *self)
 
PyObjectnrnpy_forall (PyObject *self, PyObject *args)
 
static PyObjecthocobj_iter (PyObject *raw_self)
 
static hoc_Itemnext_valid_secitem (hoc_Item *q, hoc_Item *ql)
 
static PyObjectiternext_sl (PyHocObject *po, hoc_Item *ql)
 
static PyObjecthocobj_iternext (PyObject *self)
 
static PyObjecthocobj_getitem (PyObject *self, Py_ssize_t ix)
 
static PyObjecthocobj_slice_getitem (PyObject *self, PyObject *slice)
 
static int hocobj_setitem (PyObject *self, Py_ssize_t i, PyObject *arg)
 
static int hocobj_slice_setitem (PyObject *self, PyObject *slice, PyObject *arg)
 
static PyObjectmkref (PyObject *self, PyObject *args)
 
static PyObjectmkref_safe (PyObject *self, PyObject *args)
 
static PyObjectsetpointer (PyObject *self, PyObject *args)
 
static PyObjectsetpointer_safe (PyObject *self, PyObject *args)
 
static PyObjecthocobj_vptr (PyObject *pself, PyObject *args)
 
static PyObjecthocobj_vptr_safe (PyObject *pself, PyObject *args)
 
static long hocobj_hash (PyHocObject *self)
 
PyObjectnrn_ptr_richcmp (void *self_ptr, void *other_ptr, int op)
 
static PyObjecthocobj_richcmp (PyHocObject *self, PyObject *other, int op)
 
static PyObjecthocobj_same (PyHocObject *pself, PyObject *args)
 
static PyObjecthocobj_same_safe (PyHocObject *pself, PyObject *args)
 
static char * double_array_interface (PyObject *po, long &stride)
 
double pyobj_to_double_or_fail (PyObject *obj, long obj_id)
 
static IvocVectnrnpy_vec_from_python (void *v)
 
NRN_EXPORT int nrnpy_set_vec_as_numpy (PyObject *(*p)(int, double *))
 
static void nrnpy_store_savestate_ (char **save_data, uint64_t *save_data_size)
 
static void nrnpy_restore_savestate_ (int64_t size, char *data)
 
NRN_EXPORT int nrnpy_set_toplevel_callbacks (PyObject *rvp_plot0, PyObject *plotshape_plot0, PyObject *get_mech_object_0, PyObject *store_savestate, PyObject *restore_savestate)
 
NRN_EXPORT int nrnpy_set_gui_callback (PyObject *new_gui_callback)
 
static double object_to_double_ (Object *obj)
 
static void * nrnpy_get_pyobj_ (Object *obj)
 
static void nrnpy_decref_ (void *pyobj)
 
static PyObjectgui_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 Objectrvp_rxd_to_callable_ (Object *obj)
 
NRN_EXPORT PyObjectget_plotshape_data (PyObject *sp)
 
static PyObjecthocpickle_reduce (PyObject *self, PyObject *args)
 
static PyObjecthocpickle_reduce_safe (PyObject *self, PyObject *args)
 
static PyObjecthocpickle_setstate (PyObject *self, PyObject *args)
 
static PyObjecthocpickle_setstate_safe (PyObject *self, PyObject *args)
 
static PyObjectlibpython_path (PyObject *self, PyObject *args)
 
static PyObjectlibpython_path_safe (PyObject *self, PyObject *args)
 
NRN_EXPORT int nrnpy_vec_math_register (PyObject *callback)
 
NRN_EXPORT int nrnpy_rvp_pyobj_callback_register (PyObject *callback)
 
static bool pyobj_is_vector (PyObject *obj)
 
static PyObjectpy_hocobj_math (const char *op, PyObject *obj1, PyObject *obj2)
 
static PyObjectpy_hocobj_math_unary (const char *op, PyObject *obj)
 
static PyObjectpy_hocobj_add (PyObject *obj1, PyObject *obj2)
 
static PyObjectpy_hocobj_uabs (PyObject *obj)
 
static PyObjectpy_hocobj_uneg (PyObject *obj)
 
static PyObjectpy_hocobj_upos (PyObject *obj)
 
static PyObjectpy_hocobj_sub (PyObject *obj1, PyObject *obj2)
 
static PyObjectpy_hocobj_mul (PyObject *obj1, PyObject *obj2)
 
static PyObjectpy_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)
 
static PyType_Spec obj_spec_from_name (const char *name)
 
PyObjectnrn_type_from_metaclass (PyTypeObject *meta, PyObject *mod, PyType_Spec *spec, PyObject *bases)
 
NRN_EXPORT PyObjectnrnpy_hoc ()
 
void nrnpython_reg_real_nrnpy_hoc_cpp (neuron::python::impl_ptrs *ptrs)
 

Variables

PyTypeObject * psection_type
 
std::vector< const char * > py_exposed_classes
 
void(* nrnpy_sectionlist_helper_ )(void *, Object *)
 
void *(* nrnpy_get_pyobj )(Object *obj)
 
void(* nrnpy_restore_savestate )(int64_t, char *)
 
void(* nrnpy_store_savestate )(char **save_data, uint64_t *save_data_size)
 
void(* nrnpy_decref )(void *pyobj)
 
double(* nrnpy_call_func )(Object *, double)
 
Symlisthoc_top_level_symlist
 
Symlisthoc_built_in_symlist
 
Insthoc_pc
 
int nrn_inpython_
 
Objectdatahoc_top_level_data
 
int section_object_seen
 
Symbolnrn_child_sym
 
IvocVect *(* nrnpy_vec_from_python_p_ )(void *)
 
Object **(* nrnpy_vec_to_python_p_ )(void *)
 
Object **(* nrnpy_vec_as_numpy_helper_ )(int, double *)
 
Object *(* nrnpy_rvp_rxd_to_callable )(Object *)
 
PyObjectpmech_types
 
PyObjectrangevars_
 
int hoc_max_builtin_class_id
 
static cTemplatehoc_vec_template_
 
static cTemplatehoc_list_template_
 
static cTemplatehoc_sectionlist_template_
 
static std::unordered_map< Symbol *, PyTypeObject * > sym_to_type_map
 
static std::unordered_map< PyTypeObject *, Symbol * > type_to_sym_map
 
static std::vector< std::string > exposed_py_type_names
 
static char array_interface_typestr [5] = "|f8"
 
static PyObjectpfunc_get_docstring = nullptr
 
static PyObjecttopmethdict = nullptr
 
static const char * hocobj_docstring = "class neuron.hoc.HocObject - Hoc Object wrapper"
 
static PyObjectrvp_plot = nullptr
 
static PyObjectplotshape_plot = nullptr
 
static PyObjectget_mech_object_ = nullptr
 
static PyObjectnrnpy_rvp_pyobj_callback = nullptr
 
PyTypeObject * hocobject_type
 
static PyType_Slot hocclass_slots []
 
static PyType_Spec hocclass_spec
 
static PyMethodDef HocMethods []
 
static PyObjectcurargs_
 
static int refuse_to_look
 
static Symbolsym_vec_x
 
static Symbolsym_mat_x
 
static Symbolsym_netcon_weight
 
static PyObject *(* vec_as_numpy )(int, double *)
 
static PyObjectstore_savestate_ = nullptr
 
static PyObjectrestore_savestate_ = nullptr
 
static PyObjectgui_callback = nullptr
 
static PyMethodDef hocobj_methods []
 
static PyMethodDef toplevel_methods []
 
static PyObjectnrnpy_vec_math = nullptr
 
int(* nrnpy_nrncore_enable_value_p_ )()
 value of neuron.coreneuron.enable as 0, 1 (-1 if error) More...
 
int(* nrnpy_nrncore_file_mode_value_p_ )()
 value of neuron.coreneuron.file_mode as 0, 1 (-1 if error) More...
 
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. More...
 

Macro Definition Documentation

◆ BYTEHEADER

#define BYTEHEADER
Value:
uint32_t _II__; \
char* _IN__; \
char _OUT__[16]; \
int BYTESWAP_FLAG = 0;

Definition at line 2971 of file nrnpy_hoc.cpp.

◆ BYTESWAP

#define BYTESWAP (   _X__,
  _TYPE__ 
)
Value:
if (BYTESWAP_FLAG == 1) { \
_IN__ = (char*) &(_X__); \
for (_II__ = 0; _II__ < sizeof(_TYPE__); _II__++) { \
_OUT__[_II__] = _IN__[sizeof(_TYPE__) - _II__ - 1]; \
} \
(_X__) = *((_TYPE__*) &_OUT__); \
}

Definition at line 2976 of file nrnpy_hoc.cpp.

Function Documentation

◆ add2topdict()

static void add2topdict ( PyObject dict)
static

Definition at line 3100 of file nrnpy_hoc.cpp.

◆ araychk()

static int araychk ( Arrayinfo a,
PyHocObject po,
int  ix 
)
static

Definition at line 1669 of file nrnpy_hoc.cpp.

◆ araylen()

static int araylen ( Arrayinfo a,
PyHocObject po 
)
static

Definition at line 1641 of file nrnpy_hoc.cpp.

◆ cable_prop_eval()

double cable_prop_eval ( Symbol sym)

Definition at line 1447 of file cabcode.cpp.

◆ component()

static HocReturnType component ( PyHocObject po)
static

Definition at line 510 of file nrnpy_hoc.cpp.

◆ cpp2refstr()

static PyObject * cpp2refstr ( char **  cpp)
static

Definition at line 2303 of file nrnpy_hoc.cpp.

◆ double_array_interface()

static char* double_array_interface ( PyObject po,
long &  stride 
)
static

Definition at line 2507 of file nrnpy_hoc.cpp.

◆ eval_component()

static void eval_component ( PyHocObject po,
int  ix 
)
static

Definition at line 949 of file nrnpy_hoc.cpp.

◆ fcall()

static void* fcall ( void *  vself,
void *  vargs 
)
static

Definition at line 717 of file nrnpy_hoc.cpp.

◆ get_endian_character()

char get_endian_character ( )

Definition at line 3197 of file nrnpy_hoc.cpp.

◆ get_nrncore_opt_value()

static int get_nrncore_opt_value ( const char *  option)
static

Definition at line 3269 of file nrnpy_hoc.cpp.

◆ get_plotshape_data()

NRN_EXPORT PyObject* get_plotshape_data ( PyObject sp)

Definition at line 2891 of file nrnpy_hoc.cpp.

◆ getsym()

static Symbol* getsym ( char *  name,
Object ho,
int  fail 
)
static

Definition at line 483 of file nrnpy_hoc.cpp.

◆ gui_helper_()

static Object** gui_helper_ ( const char *  name,
Object obj 
)
static

Definition at line 2786 of file nrnpy_hoc.cpp.

◆ gui_helper_3_()

static Object** gui_helper_3_ ( const char *  name,
Object obj,
int  handle_strptr 
)
static

Definition at line 2761 of file nrnpy_hoc.cpp.

◆ gui_helper_3_helper_()

static PyObject* gui_helper_3_helper_ ( const char *  name,
Object obj,
int  handle_strptr 
)
static

Definition at line 2696 of file nrnpy_hoc.cpp.

◆ gui_helper_3_str_()

static char** gui_helper_3_str_ ( const char *  name,
Object obj,
int  handle_strptr 
)
static

Definition at line 2774 of file nrnpy_hoc.cpp.

◆ hoc_ac()

static PyObject* hoc_ac ( PyObject self,
PyObject args 
)
static

Definition at line 218 of file nrnpy_hoc.cpp.

◆ hoc_ac_safe()

static PyObject* hoc_ac_safe ( PyObject self,
PyObject args 
)
static

Definition at line 223 of file nrnpy_hoc.cpp.

◆ hoc_call()

void hoc_call ( )

Definition at line 1398 of file code.cpp.

◆ hoc_evalpointer_err()

static int hoc_evalpointer_err ( )
static

if hoc_evalpointer calls hoc_execerror, return 1

Definition at line 192 of file nrnpy_hoc.cpp.

◆ hoc_newobj1()

Object* hoc_newobj1 ( Symbol sym,
int  narg 
)

Definition at line 497 of file hoc_oop.cpp.

◆ hoc_obj_look_inside_stack()

Object* hoc_obj_look_inside_stack ( int  i)

Definition at line 885 of file code.cpp.

◆ hoc_object_component()

void hoc_object_component ( )

Definition at line 977 of file hoc_oop.cpp.

◆ hoc_objectvar()

void hoc_objectvar ( )

Definition at line 792 of file hoc_oop.cpp.

◆ hoc_objpop()

Object** hoc_objpop ( )

Pop pointer to object pointer and return top elem from stack.

When using objpop, after dealing with the pointer, one should call hoc_tobj_unref(pobj) in order to prevent memory leakage since the object may have been reffed when it was pushed on the stack.

Definition at line 943 of file code.cpp.

◆ hoc_push_string()

void hoc_push_string ( )

Definition at line 805 of file code.cpp.

◆ hoc_pushs()

void hoc_pushs ( Symbol d)

Definition at line 841 of file code.cpp.

◆ hoc_stack_type()

int hoc_stack_type ( )

Get the type of the top entry.

Definition at line 310 of file code.cpp.

◆ hoc_strpop()

char** hoc_strpop ( )

Definition at line 962 of file code.cpp.

◆ hoc_tobj_unref()

void hoc_tobj_unref ( Object **  p)

Definition at line 160 of file code.cpp.

◆ hoc_unref_defer()

void hoc_unref_defer ( )

Definition at line 181 of file code.cpp.

◆ hoc_valid_stmt()

bool hoc_valid_stmt ( const char *  stmt,
Object ob 
)

Definition at line 21 of file ocjump.cpp.

◆ hocclass_getattro()

static PyObject * hocclass_getattro ( PyObject self,
PyObject pyname 
)
static

Definition at line 1019 of file nrnpy_hoc.cpp.

◆ hocclass_getitem()

static PyObject* hocclass_getitem ( PyObject self,
Py_ssize_t  ix 
)
static

Definition at line 148 of file nrnpy_hoc.cpp.

◆ hocclass_init()

static int hocclass_init ( hocclass cls,
PyObject args,
PyObject kwds 
)
static

Definition at line 140 of file nrnpy_hoc.cpp.

◆ hocobj_aray()

static Arrayinfo* hocobj_aray ( Symbol sym,
Object ho 
)
static

Definition at line 854 of file nrnpy_hoc.cpp.

◆ hocobj_baseattr()

static PyObject* hocobj_baseattr ( PyObject subself,
PyObject args 
)
static

Definition at line 1410 of file nrnpy_hoc.cpp.

◆ hocobj_baseattr_safe()

static PyObject* hocobj_baseattr_safe ( PyObject subself,
PyObject args 
)
static

Definition at line 1418 of file nrnpy_hoc.cpp.

◆ hocobj_call()

static PyObject * hocobj_call ( PyHocObject self,
PyObject args,
PyObject kwrds 
)
static

Definition at line 782 of file nrnpy_hoc.cpp.

◆ hocobj_call_arg()

PyObject* hocobj_call_arg ( int  i)

Definition at line 778 of file nrnpy_hoc.cpp.

◆ hocobj_dealloc()

static void hocobj_dealloc ( PyHocObject self)
static

Definition at line 235 of file nrnpy_hoc.cpp.

◆ hocobj_getattr()

static PyObject* hocobj_getattr ( PyObject subself,
PyObject pyname 
)
static

Definition at line 1065 of file nrnpy_hoc.cpp.

◆ hocobj_getattro()

static PyObject* hocobj_getattro ( PyObject subself,
PyObject name 
)
static

Definition at line 1423 of file nrnpy_hoc.cpp.

◆ hocobj_getitem()

static PyObject* hocobj_getitem ( PyObject self,
Py_ssize_t  ix 
)
static

Definition at line 1933 of file nrnpy_hoc.cpp.

◆ hocobj_getsec()

static PyObject* hocobj_getsec ( Symbol sym)
static

Definition at line 937 of file nrnpy_hoc.cpp.

◆ hocobj_hash()

static long hocobj_hash ( PyHocObject self)
static

Definition at line 2392 of file nrnpy_hoc.cpp.

◆ hocobj_init()

static int hocobj_init ( PyObject subself,
PyObject args,
PyObject kwds 
)
static

Definition at line 320 of file nrnpy_hoc.cpp.

◆ hocobj_iter()

static PyObject* hocobj_iter ( PyObject raw_self)
static

Definition at line 1757 of file nrnpy_hoc.cpp.

◆ hocobj_iternext()

static PyObject* hocobj_iternext ( PyObject self)
static

Definition at line 1906 of file nrnpy_hoc.cpp.

◆ hocobj_len()

static Py_ssize_t hocobj_len ( PyObject self)
static

Definition at line 1692 of file nrnpy_hoc.cpp.

◆ hocobj_name()

static PyObject* hocobj_name ( PyObject pself,
PyObject args 
)
static

Definition at line 346 of file nrnpy_hoc.cpp.

◆ hocobj_name_safe()

static PyObject* hocobj_name_safe ( PyObject pself,
PyObject args 
)
static

Definition at line 401 of file nrnpy_hoc.cpp.

◆ hocobj_new()

static PyObject* hocobj_new ( PyTypeObject *  subtype,
PyObject args,
PyObject kwds 
)
static

Definition at line 262 of file nrnpy_hoc.cpp.

◆ hocobj_nonzero()

static int hocobj_nonzero ( PyObject self)
static

Definition at line 1718 of file nrnpy_hoc.cpp.

◆ hocobj_objectvar()

static int hocobj_objectvar ( Symbol sym)
static

Definition at line 919 of file nrnpy_hoc.cpp.

◆ hocobj_pushargs()

int hocobj_pushargs ( PyObject args,
std::vector< neuron::unique_cstr > &  s2free 
)

Definition at line 416 of file nrnpy_hoc.cpp.

◆ hocobj_pushtop()

static void hocobj_pushtop ( PyHocObject po,
Symbol sym,
int  ix 
)
static

Definition at line 903 of file nrnpy_hoc.cpp.

◆ hocobj_repr()

static PyObject* hocobj_repr ( PyObject p)
static

Definition at line 405 of file nrnpy_hoc.cpp.

◆ hocobj_richcmp()

static PyObject* hocobj_richcmp ( PyHocObject self,
PyObject other,
int  op 
)
static

Definition at line 2422 of file nrnpy_hoc.cpp.

◆ hocobj_same()

static PyObject* hocobj_same ( PyHocObject pself,
PyObject args 
)
static

Definition at line 2494 of file nrnpy_hoc.cpp.

◆ hocobj_same_safe()

static PyObject* hocobj_same_safe ( PyHocObject pself,
PyObject args 
)
static

Definition at line 2503 of file nrnpy_hoc.cpp.

◆ hocobj_setattro()

static int hocobj_setattro ( PyObject subself,
PyObject pyname,
PyObject value 
)
static

Definition at line 1455 of file nrnpy_hoc.cpp.

◆ hocobj_setitem()

static int hocobj_setitem ( PyObject self,
Py_ssize_t  i,
PyObject arg 
)
static

Definition at line 2102 of file nrnpy_hoc.cpp.

◆ hocobj_slice_getitem()

static PyObject* hocobj_slice_getitem ( PyObject self,
PyObject slice 
)
static

Definition at line 2073 of file nrnpy_hoc.cpp.

◆ hocobj_slice_setitem()

static int hocobj_slice_setitem ( PyObject self,
PyObject slice,
PyObject arg 
)
static

Definition at line 2223 of file nrnpy_hoc.cpp.

◆ hocobj_vptr()

static PyObject* hocobj_vptr ( PyObject pself,
PyObject args 
)
static

Definition at line 2376 of file nrnpy_hoc.cpp.

◆ hocobj_vptr_safe()

static PyObject* hocobj_vptr_safe ( PyObject pself,
PyObject args 
)
static

Definition at line 2388 of file nrnpy_hoc.cpp.

◆ hocpickle_reduce()

static PyObject* hocpickle_reduce ( PyObject self,
PyObject args 
)
static

Definition at line 2926 of file nrnpy_hoc.cpp.

◆ hocpickle_reduce_safe()

static PyObject* hocpickle_reduce_safe ( PyObject self,
PyObject args 
)
static

Definition at line 2966 of file nrnpy_hoc.cpp.

◆ hocpickle_setstate()

static PyObject* hocpickle_setstate ( PyObject self,
PyObject args 
)
static

Definition at line 2985 of file nrnpy_hoc.cpp.

◆ hocpickle_setstate_safe()

static PyObject* hocpickle_setstate_safe ( PyObject self,
PyObject args 
)
static

Definition at line 3043 of file nrnpy_hoc.cpp.

◆ intermediate()

static PyHocObject* intermediate ( PyHocObject po,
Symbol sym,
int  ix 
)
static

Definition at line 876 of file nrnpy_hoc.cpp.

◆ iternext_sl()

static PyObject* iternext_sl ( PyHocObject po,
hoc_Item ql 
)
static

Definition at line 1809 of file nrnpy_hoc.cpp.

◆ ivoc_alias_lookup()

Symbol* ivoc_alias_lookup ( const char *  name,
Object ob 
)

Definition at line 144 of file strfun.cpp.

◆ ivoc_list_count()

int ivoc_list_count ( Object olist)

Definition at line 396 of file oclist.cpp.

◆ libpython_path()

static PyObject* libpython_path ( PyObject self,
PyObject args 
)
static

Definition at line 3047 of file nrnpy_hoc.cpp.

◆ libpython_path_safe()

static PyObject* libpython_path_safe ( PyObject self,
PyObject args 
)
static

Definition at line 3067 of file nrnpy_hoc.cpp.

◆ mkref()

static PyObject* mkref ( PyObject self,
PyObject args 
)
static

Definition at line 2268 of file nrnpy_hoc.cpp.

◆ mkref_safe()

static PyObject* mkref_safe ( PyObject self,
PyObject args 
)
static

Definition at line 2298 of file nrnpy_hoc.cpp.

◆ next_valid_secitem()

static hoc_Item* next_valid_secitem ( hoc_Item q,
hoc_Item ql 
)
static

Definition at line 1793 of file nrnpy_hoc.cpp.

◆ nrn_chk_data_handle()

bool nrn_chk_data_handle ( const neuron::container::data_handle< double > &  pd)

Definition at line 182 of file nrnpy_hoc.cpp.

◆ nrn_hocobj_handle()

PyObject* nrn_hocobj_handle ( neuron::container::data_handle< double >  d)

Definition at line 957 of file nrnpy_hoc.cpp.

◆ nrn_hocobj_ptr()

NRN_EXPORT PyObject* nrn_hocobj_ptr ( double *  pd)

Definition at line 966 of file nrnpy_hoc.cpp.

◆ nrn_is_hocobj_ptr()

int nrn_is_hocobj_ptr ( PyObject po,
neuron::container::data_handle< double > &  pd 
)

Definition at line 970 of file nrnpy_hoc.cpp.

◆ nrn_matrix_dim()

int nrn_matrix_dim ( void *  vm,
int  d 
)

Definition at line 15 of file ocmatrix.cpp.

◆ nrn_netcon_weight()

int nrn_netcon_weight ( NetCon nc,
double **  pw 
)

Definition at line 122 of file netcvode.cpp.

◆ nrn_ptr_richcmp()

PyObject* nrn_ptr_richcmp ( void *  self_ptr,
void *  other_ptr,
int  op 
)

Definition at line 2396 of file nrnpy_hoc.cpp.

◆ nrn_secref_nchild()

int nrn_secref_nchild ( Section sec)

Definition at line 234 of file secref.cpp.

◆ nrn_type_from_metaclass()

PyObject* nrn_type_from_metaclass ( PyTypeObject *  meta,
PyObject mod,
PyType_Spec *  spec,
PyObject bases 
)

Definition at line 6 of file nrn_metaclass.cpp.

◆ nrncore_arg()

static char* nrncore_arg ( double  tstop)
static

Definition at line 3306 of file nrnpy_hoc.cpp.

◆ nrncore_enable_value()

static int nrncore_enable_value ( )
static

return value of neuron.coreneuron.enable

Definition at line 3291 of file nrnpy_hoc.cpp.

◆ nrncore_file_mode_value()

static int nrncore_file_mode_value ( )
static

return value of neuron.coreneuron.file_mode

Definition at line 3296 of file nrnpy_hoc.cpp.

◆ nrnexec()

static PyObject* nrnexec ( PyObject self,
PyObject args 
)
static

Definition at line 205 of file nrnpy_hoc.cpp.

◆ nrnexec_safe()

static PyObject* nrnexec_safe ( PyObject self,
PyObject args 
)
static

Definition at line 214 of file nrnpy_hoc.cpp.

◆ nrnpy_call_func_()

static double nrnpy_call_func_ ( Object obj,
double  x 
)
static

Definition at line 3498 of file nrnpy_hoc.cpp.

◆ nrnpy_cas()

PyObject* nrnpy_cas ( PyObject self,
PyObject args 
)

Definition at line 2967 of file nrnpy_nrn.cpp.

◆ nrnpy_cas_safe()

PyObject* nrnpy_cas_safe ( PyObject self,
PyObject args 
)

Definition at line 2977 of file nrnpy_nrn.cpp.

◆ nrnpy_decref_()

static void nrnpy_decref_ ( void *  pyobj)
static

Definition at line 2689 of file nrnpy_hoc.cpp.

◆ nrnpy_forall()

PyObject* nrnpy_forall ( PyObject self,
PyObject args 
)

Definition at line 1743 of file nrnpy_hoc.cpp.

◆ nrnpy_forall_safe()

PyObject * nrnpy_forall_safe ( PyObject self,
PyObject args 
)

Definition at line 1752 of file nrnpy_hoc.cpp.

◆ nrnpy_get_pyobj_()

static void* nrnpy_get_pyobj_ ( Object obj)
static

Definition at line 2681 of file nrnpy_hoc.cpp.

◆ nrnpy_ho2po()

PyObject* nrnpy_ho2po ( Object o)

Definition at line 566 of file nrnpy_hoc.cpp.

◆ nrnpy_hoc()

NRN_EXPORT PyObject* nrnpy_hoc ( )

Definition at line 3354 of file nrnpy_hoc.cpp.

◆ nrnpy_hoc_bool_pop()

static void* nrnpy_hoc_bool_pop ( )
static

Definition at line 712 of file nrnpy_hoc.cpp.

◆ nrnpy_hoc_int_pop()

static void* nrnpy_hoc_int_pop ( )
static

Definition at line 707 of file nrnpy_hoc.cpp.

◆ nrnpy_hoc_pop()

PyObject* nrnpy_hoc_pop ( const char *  mes)

Definition at line 620 of file nrnpy_hoc.cpp.

◆ nrnpy_newsecobj_safe()

PyObject* nrnpy_newsecobj_safe ( PyObject self,
PyObject args,
PyObject kwds 
)

Definition at line 516 of file nrnpy_nrn.cpp.

◆ nrnpy_nrn()

PyObject* nrnpy_nrn ( )

Definition at line 3005 of file nrnpy_nrn.cpp.

◆ nrnpy_numbercheck()

int nrnpy_numbercheck ( PyObject po)

Definition at line 542 of file nrnpy_hoc.cpp.

◆ nrnpy_po2ho()

Object* nrnpy_po2ho ( PyObject po)

Definition at line 592 of file nrnpy_hoc.cpp.

◆ nrnpy_restore_savestate_()

static void nrnpy_restore_savestate_ ( int64_t  size,
char *  data 
)
static

Definition at line 2637 of file nrnpy_hoc.cpp.

◆ nrnpy_rvp_pyobj_callback_register()

NRN_EXPORT int nrnpy_rvp_pyobj_callback_register ( PyObject callback)

Definition at line 3121 of file nrnpy_hoc.cpp.

◆ nrnpy_set_gui_callback()

NRN_EXPORT int nrnpy_set_gui_callback ( PyObject new_gui_callback)

Definition at line 2670 of file nrnpy_hoc.cpp.

◆ nrnpy_set_toplevel_callbacks()

NRN_EXPORT 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 2654 of file nrnpy_hoc.cpp.

◆ nrnpy_set_vec_as_numpy()

NRN_EXPORT int nrnpy_set_vec_as_numpy ( PyObject *(*)(int, double *)  p)

Definition at line 2609 of file nrnpy_hoc.cpp.

◆ nrnpy_store_savestate_()

static void nrnpy_store_savestate_ ( char **  save_data,
uint64_t *  save_data_size 
)
static

Definition at line 2618 of file nrnpy_hoc.cpp.

◆ nrnpy_vec_from_python()

static IvocVect* nrnpy_vec_from_python ( void *  v)
static

Definition at line 2556 of file nrnpy_hoc.cpp.

◆ nrnpy_vec_math_register()

NRN_EXPORT int nrnpy_vec_math_register ( PyObject callback)

Definition at line 3116 of file nrnpy_hoc.cpp.

◆ nrnpy_vec_to_python()

static Object** nrnpy_vec_to_python ( void *  v)
static

Definition at line 2803 of file nrnpy_hoc.cpp.

◆ nrnpython_reg_real_nrnpy_hoc_cpp()

void nrnpython_reg_real_nrnpy_hoc_cpp ( neuron::python::impl_ptrs ptrs)

Definition at line 3491 of file nrnpy_hoc.cpp.

◆ obj_spec_from_name()

static PyType_Spec obj_spec_from_name ( const char *  name)
static

Definition at line 3339 of file nrnpy_hoc.cpp.

◆ object_to_double_()

static double object_to_double_ ( Object obj)
static

Definition at line 2675 of file nrnpy_hoc.cpp.

◆ py_hocobj_add()

static PyObject* py_hocobj_add ( PyObject obj1,
PyObject obj2 
)
static

Definition at line 3165 of file nrnpy_hoc.cpp.

◆ py_hocobj_div()

static PyObject* py_hocobj_div ( PyObject obj1,
PyObject obj2 
)
static

Definition at line 3189 of file nrnpy_hoc.cpp.

◆ py_hocobj_math()

static PyObject* py_hocobj_math ( const char *  op,
PyObject obj1,
PyObject obj2 
)
static

Definition at line 3139 of file nrnpy_hoc.cpp.

◆ py_hocobj_math_unary()

static PyObject* py_hocobj_math_unary ( const char *  op,
PyObject obj 
)
static

Definition at line 3156 of file nrnpy_hoc.cpp.

◆ py_hocobj_mul()

static PyObject* py_hocobj_mul ( PyObject obj1,
PyObject obj2 
)
static

Definition at line 3185 of file nrnpy_hoc.cpp.

◆ py_hocobj_sub()

static PyObject* py_hocobj_sub ( PyObject obj1,
PyObject obj2 
)
static

Definition at line 3181 of file nrnpy_hoc.cpp.

◆ py_hocobj_uabs()

static PyObject* py_hocobj_uabs ( PyObject obj)
static

Definition at line 3169 of file nrnpy_hoc.cpp.

◆ py_hocobj_uneg()

static PyObject* py_hocobj_uneg ( PyObject obj)
static

Definition at line 3173 of file nrnpy_hoc.cpp.

◆ py_hocobj_upos()

static PyObject* py_hocobj_upos ( PyObject obj)
static

Definition at line 3177 of file nrnpy_hoc.cpp.

◆ pyobj_is_vector()

static bool pyobj_is_vector ( PyObject obj)
static

Definition at line 3126 of file nrnpy_hoc.cpp.

◆ pyobj_to_double_or_fail()

double pyobj_to_double_or_fail ( PyObject obj,
long  obj_id 
)
inline

Definition at line 2547 of file nrnpy_hoc.cpp.

◆ pyobject_in_objptr()

static void pyobject_in_objptr ( Object **  op,
PyObject po 
)
static

Definition at line 338 of file nrnpy_hoc.cpp.

◆ rvp_rxd_to_callable_()

static Object* rvp_rxd_to_callable_ ( Object obj)
static

Definition at line 2879 of file nrnpy_hoc.cpp.

◆ save_pc()

static Inst* save_pc ( Inst newpc)
static

Definition at line 409 of file nrnpy_hoc.cpp.

◆ sec_access_push()

void sec_access_push ( )

Definition at line 749 of file cabcode.cpp.

◆ seclist_count()

static Py_ssize_t seclist_count ( Object ho)
static

Definition at line 1687 of file nrnpy_hoc.cpp.

◆ sectionlist_helper_()

static void sectionlist_helper_ ( void *  sl,
Object args 
)
static

Definition at line 3228 of file nrnpy_hoc.cpp.

◆ set_final_from_stk()

static int set_final_from_stk ( PyObject po)
static

Definition at line 655 of file nrnpy_hoc.cpp.

◆ setpointer()

static PyObject* setpointer ( PyObject self,
PyObject args 
)
static

Definition at line 2325 of file nrnpy_hoc.cpp.

◆ setpointer_safe()

static PyObject* setpointer_safe ( PyObject self,
PyObject args 
)
static

Definition at line 2372 of file nrnpy_hoc.cpp.

◆ setup_doc_system()

static int setup_doc_system ( )
static

Definition at line 998 of file nrnpy_hoc.cpp.

◆ symlist2dict()

static void symlist2dict ( Symlist sl,
PyObject dict 
)
static

Definition at line 982 of file nrnpy_hoc.cpp.

◆ toplevel_get()

PyObject* toplevel_get ( PyObject subself,
const char *  n 
)

Definition at line 1051 of file nrnpy_hoc.cpp.

◆ vec_as_numpy_helper()

static Object** vec_as_numpy_helper ( int  size,
double *  data 
)
static

Definition at line 2790 of file nrnpy_hoc.cpp.

Variable Documentation

◆ array_interface_typestr

char array_interface_typestr[5] = "|f8"
static

Definition at line 98 of file nrnpy_hoc.cpp.

◆ curargs_

PyObject* curargs_
static

Definition at line 776 of file nrnpy_hoc.cpp.

◆ exposed_py_type_names

std::vector<std::string> exposed_py_type_names
static

Definition at line 90 of file nrnpy_hoc.cpp.

◆ get_mech_object_

PyObject* get_mech_object_ = nullptr
static

Definition at line 127 of file nrnpy_hoc.cpp.

◆ gui_callback

PyObject* gui_callback = nullptr
static

Definition at line 2669 of file nrnpy_hoc.cpp.

◆ hoc_built_in_symlist

Symlist* hoc_built_in_symlist
extern

Definition at line 28 of file symbol.cpp.

◆ hoc_list_template_

cTemplate* hoc_list_template_
static

Definition at line 85 of file nrnpy_hoc.cpp.

◆ hoc_max_builtin_class_id

int hoc_max_builtin_class_id
extern

Definition at line 40 of file hoc_oop.cpp.

◆ hoc_pc

Inst* hoc_pc
extern

Definition at line 78 of file code.cpp.

◆ hoc_sectionlist_template_

cTemplate* hoc_sectionlist_template_
static

Definition at line 86 of file nrnpy_hoc.cpp.

◆ hoc_top_level_data

Objectdata* hoc_top_level_data
extern

Definition at line 123 of file hoc_oop.cpp.

◆ hoc_top_level_symlist

Symlist* hoc_top_level_symlist
extern

Definition at line 16 of file symdir.cpp.

◆ hoc_vec_template_

cTemplate* hoc_vec_template_
static

Definition at line 84 of file nrnpy_hoc.cpp.

◆ hocclass_slots

PyType_Slot hocclass_slots[]
static
Initial value:
= {{Py_tp_base, nullptr},
{Py_tp_init, (void*) hocclass_init},
{Py_tp_getattro, (void*) hocclass_getattro},
{Py_sq_item, (void*) hocclass_getitem},
{0, nullptr}}
static PyObject * hocclass_getitem(PyObject *self, Py_ssize_t ix)
Definition: nrnpy_hoc.cpp:148
static int hocclass_init(hocclass *cls, PyObject *args, PyObject *kwds)
Definition: nrnpy_hoc.cpp:140
static PyObject * hocclass_getattro(PyObject *self, PyObject *pyname)
Definition: nrnpy_hoc.cpp:1019

Definition at line 168 of file nrnpy_hoc.cpp.

◆ hocclass_spec

PyType_Spec hocclass_spec
static
Initial value:
= {"hoc.HocClass",
0,
0,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HEAPTYPE,
static PyType_Slot hocclass_slots[]
Definition: nrnpy_hoc.cpp:168

Definition at line 175 of file nrnpy_hoc.cpp.

◆ HocMethods

PyMethodDef HocMethods[]
static
Initial value:
= {
{"execute",
METH_VARARGS,
"Execute a hoc command, return True on success, False on failure."},
{"hoc_ac", hoc_ac_safe, METH_VARARGS, "Get (or set) the scalar hoc_ac_."},
{nullptr, nullptr, 0, nullptr}}
static PyObject * nrnexec_safe(PyObject *self, PyObject *args)
Definition: nrnpy_hoc.cpp:214
static PyObject * hoc_ac_safe(PyObject *self, PyObject *args)
Definition: nrnpy_hoc.cpp:223

Definition at line 227 of file nrnpy_hoc.cpp.

◆ hocobj_docstring

const char* hocobj_docstring = "class neuron.hoc.HocObject - Hoc Object wrapper"
static

Definition at line 110 of file nrnpy_hoc.cpp.

◆ hocobj_methods

PyMethodDef hocobj_methods[]
static
Initial value:
= {
{"baseattr", hocobj_baseattr_safe, METH_VARARGS, "To allow use of an overrided base method"},
{"hocobjptr", hocobj_vptr_safe, METH_NOARGS, "Hoc Object pointer as a long int"},
{"same",
(PyCFunction) hocobj_same_safe,
METH_VARARGS,
"o1.same(o2) return True if o1 and o2 wrap the same internal HOC Object"},
{"hname", hocobj_name_safe, METH_NOARGS, "More specific than __str__() or __attr__()."},
{"__reduce__", hocpickle_reduce_safe, METH_VARARGS, "pickle interface"},
{"__setstate__", hocpickle_setstate_safe, METH_VARARGS, "pickle interface"},
{nullptr, nullptr, 0, nullptr}}
static PyObject * hocobj_baseattr_safe(PyObject *subself, PyObject *args)
Definition: nrnpy_hoc.cpp:1418
static PyObject * hocobj_same_safe(PyHocObject *pself, PyObject *args)
Definition: nrnpy_hoc.cpp:2503
static PyObject * hocobj_vptr_safe(PyObject *pself, PyObject *args)
Definition: nrnpy_hoc.cpp:2388
static PyObject * hocpickle_reduce_safe(PyObject *self, PyObject *args)
Definition: nrnpy_hoc.cpp:2966
static PyObject * hocobj_name_safe(PyObject *pself, PyObject *args)
Definition: nrnpy_hoc.cpp:401
static PyObject * hocpickle_setstate_safe(PyObject *self, PyObject *args)
Definition: nrnpy_hoc.cpp:3043

Definition at line 3072 of file nrnpy_hoc.cpp.

◆ hocobject_type

PyTypeObject* hocobject_type

Definition at line 130 of file nrnpy_hoc.cpp.

◆ nrn_child_sym

Symbol* nrn_child_sym
extern

Definition at line 25 of file secref.cpp.

◆ nrn_inpython_

int nrn_inpython_
extern

Definition at line 52 of file hoc.cpp.

◆ nrnpy_call_func

double(* nrnpy_call_func) (Object *, double) ( Object ,
double   
)
extern

Definition at line 119 of file ivocvect.cpp.

◆ nrnpy_decref

void(* nrnpy_decref) (void *pyobj) ( void *  pyobj)
extern

Definition at line 46 of file shapeplt.cpp.

◆ nrnpy_get_pyobj

void*(* nrnpy_get_pyobj) (Object *obj) ( Object obj)
extern

Definition at line 45 of file shapeplt.cpp.

◆ nrnpy_nrncore_arg_p_

char*(* nrnpy_nrncore_arg_p_) (double tstop) ( double  tstop)
extern

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 130 of file nrncore_write.cpp.

◆ nrnpy_nrncore_enable_value_p_

int(* nrnpy_nrncore_enable_value_p_) () ( )
extern

value of neuron.coreneuron.enable as 0, 1 (-1 if error)

Definition at line 127 of file nrncore_write.cpp.

◆ nrnpy_nrncore_file_mode_value_p_

int(* nrnpy_nrncore_file_mode_value_p_) () ( )
extern

value of neuron.coreneuron.file_mode as 0, 1 (-1 if error)

Definition at line 128 of file nrncore_write.cpp.

◆ nrnpy_restore_savestate

void(* nrnpy_restore_savestate) (int64_t, char *) ( int64_t  ,
char *   
)
extern

Definition at line 31 of file savstate.cpp.

◆ nrnpy_rvp_pyobj_callback

PyObject* nrnpy_rvp_pyobj_callback = nullptr
static

Definition at line 128 of file nrnpy_hoc.cpp.

◆ nrnpy_rvp_rxd_to_callable

Object*(* nrnpy_rvp_rxd_to_callable) (Object *) ( Object )
extern

Definition at line 23 of file spaceplt.cpp.

◆ nrnpy_sectionlist_helper_

void(* nrnpy_sectionlist_helper_) (void *, Object *) ( void *  ,
Object  
)
extern

◆ nrnpy_store_savestate

void(* nrnpy_store_savestate) (char **save_data, uint64_t *save_data_size) ( char **  save_data,
uint64_t *  save_data_size 
)
extern

Definition at line 32 of file savstate.cpp.

◆ nrnpy_vec_as_numpy_helper_

Object**(* nrnpy_vec_as_numpy_helper_) (int, double *) ( int  ,
double *   
)
extern

Definition at line 118 of file ivocvect.cpp.

◆ nrnpy_vec_from_python_p_

IvocVect*(* nrnpy_vec_from_python_p_) (void *) ( void *  )
extern

Definition at line 116 of file ivocvect.cpp.

◆ nrnpy_vec_math

PyObject* nrnpy_vec_math = nullptr
static

Definition at line 3114 of file nrnpy_hoc.cpp.

◆ nrnpy_vec_to_python_p_

Object**(* nrnpy_vec_to_python_p_) (void *) ( void *  )
extern

Definition at line 117 of file ivocvect.cpp.

◆ pfunc_get_docstring

PyObject* pfunc_get_docstring = nullptr
static

Definition at line 102 of file nrnpy_hoc.cpp.

◆ plotshape_plot

PyObject* plotshape_plot = nullptr
static

Definition at line 125 of file nrnpy_hoc.cpp.

◆ pmech_types

PyObject* pmech_types
extern

Definition at line 122 of file nrnpy_nrn.cpp.

◆ psection_type

PyTypeObject* psection_type
extern

Definition at line 111 of file nrnpy_nrn.cpp.

◆ py_exposed_classes

std::vector<const char*> py_exposed_classes
extern

Definition at line 37 of file hoc_oop.cpp.

◆ rangevars_

PyObject* rangevars_
extern

Definition at line 123 of file nrnpy_nrn.cpp.

◆ refuse_to_look

int refuse_to_look
static

Definition at line 1422 of file nrnpy_hoc.cpp.

◆ restore_savestate_

PyObject* restore_savestate_ = nullptr
static

Definition at line 2615 of file nrnpy_hoc.cpp.

◆ rvp_plot

PyObject* rvp_plot = nullptr
static

Definition at line 124 of file nrnpy_hoc.cpp.

◆ section_object_seen

int section_object_seen
extern

Definition at line 28 of file hoc_oop.cpp.

◆ store_savestate_

PyObject* store_savestate_ = nullptr
static

Definition at line 2614 of file nrnpy_hoc.cpp.

◆ sym_mat_x

Symbol* sym_mat_x
static

Definition at line 1638 of file nrnpy_hoc.cpp.

◆ sym_netcon_weight

Symbol* sym_netcon_weight
static

Definition at line 1639 of file nrnpy_hoc.cpp.

◆ sym_to_type_map

std::unordered_map<Symbol*, PyTypeObject*> sym_to_type_map
static

Definition at line 88 of file nrnpy_hoc.cpp.

◆ sym_vec_x

Symbol* sym_vec_x
static

Definition at line 1637 of file nrnpy_hoc.cpp.

◆ toplevel_methods

PyMethodDef toplevel_methods[]
static
Initial value:
= {
{"ref", mkref_safe, METH_VARARGS, "Wrap to allow call by reference in a hoc function"},
{"cas", nrnpy_cas_safe, METH_VARARGS, "Return the currently accessed section."},
{"allsec", nrnpy_forall_safe, METH_VARARGS, "Return iterator over all sections."},
{"Section",
(PyCFunction) nrnpy_newsecobj_safe,
METH_VARARGS | METH_KEYWORDS,
"Return a new Section"},
{"setpointer", setpointer_safe, METH_VARARGS, "Assign hoc variable address to NMODL POINTER"},
{"libpython_path",
METH_NOARGS,
"Return full path to file that contains Py_Initialize()"},
{nullptr, nullptr, 0, nullptr}}
static PyObject * setpointer_safe(PyObject *self, PyObject *args)
Definition: nrnpy_hoc.cpp:2372
PyObject * nrnpy_newsecobj_safe(PyObject *, PyObject *, PyObject *)
Definition: nrnpy_nrn.cpp:516
static PyObject * mkref_safe(PyObject *self, PyObject *args)
Definition: nrnpy_hoc.cpp:2298
PyObject * nrnpy_cas_safe(PyObject *, PyObject *)
Definition: nrnpy_nrn.cpp:2977
static PyObject * libpython_path_safe(PyObject *self, PyObject *args)
Definition: nrnpy_hoc.cpp:3067
PyObject * nrnpy_forall_safe(PyObject *, PyObject *)
Definition: nrnpy_hoc.cpp:1752

Definition at line 3085 of file nrnpy_hoc.cpp.

◆ topmethdict

PyObject* topmethdict = nullptr
static

Definition at line 107 of file nrnpy_hoc.cpp.

◆ type_to_sym_map

std::unordered_map<PyTypeObject*, Symbol*> type_to_sym_map
static

Definition at line 89 of file nrnpy_hoc.cpp.

◆ vec_as_numpy

PyObject*(* vec_as_numpy) (int, double *) ( int  ,
double *   
)
static

Definition at line 2608 of file nrnpy_hoc.cpp.