3 #include "../../nrnconf.h"
45 extern "C" void nrnpy_set_pr_etal(
int (*cbpr_stdoe)(
int,
char*),
int (*cbpass)());
78 symbol->name = strdup(
name);
85 return (*pitm)->element.sec;
100 sec->prop->dparam[2] = length;
104 sec->recalc_area_ = 1;
118 sec->prop->dparam[7] = val;
120 sec->recalc_area_ = 1;
124 return sec->prop->dparam[4].get<
double>();
129 sec->prop->dparam[4] = val;
131 sec->recalc_area_ = 1;
177 return sec->nnode - 1;
189 prop->param(0) = diam;
201 return prop->param(0);
297 Object* new_ob_ptr = *obptr;
366 size_t error_msg_size) {
368 if (error_msg && error_msg_size > 0) {
375 }
catch (
const std::exception& e) {
376 if (error_msg && error_msg_size > 0) {
377 strncpy(error_msg, e.what(), error_msg_size - 1);
378 error_msg[error_msg_size - 1] =
'\0';
382 if (error_msg && error_msg_size > 0) {
383 strncpy(error_msg,
"Unknown exception occurred", error_msg_size - 1);
384 error_msg[error_msg_size - 1] =
'\0';
392 if (error_msg && error_msg_size > 0) {
399 }
catch (
const std::exception& e) {
400 if (error_msg && error_msg_size > 0) {
401 strncpy(error_msg, e.what(), error_msg_size - 1);
402 error_msg[error_msg_size - 1] =
'\0';
406 if (error_msg && error_msg_size > 0) {
407 strncpy(error_msg,
"Unknown exception occurred", error_msg_size - 1);
408 error_msg[error_msg_size - 1] =
'\0';
434 Node* dummy_node =
nullptr;
435 return topol_distance(sec0, node0, sec1, node1, &dummy_sec, &dummy_node);
486 sec =
q->element.sec;
489 if (!
sec ||
sec->prop ==
nullptr) {
492 q->prev->next =
q->next;
495 q->next->prev =
q->prev;
582 int index = sym->u.rng.index;
595 int index = sym->u.rng.index;
608 int index = sym->u.rng.index;
621 int index = sym->u.rng.index;
633 int index = sym->u.rng.index;
646 int index = sym->u.rng.index;
const char * secname(Section *sec)
name of section (for use in error messages)
void nrn_change_nseg(Section *sec, int n)
void nrn_pushsec(Section *sec)
double nrn_ra(Section *sec)
double section_length(Section *sec)
Section * nrn_noerr_access(void)
return 0 if no accessed section
Section * nrn_sec_pop(void)
void new_sections(Object *ob, Symbol *sym, Item **pitm, int size)
neuron::container::data_handle< double > nrn_rangepointer(Section *sec, Symbol *s, double d)
Node * node_exact(Section *sec, double x)
like node_index but give proper node when x is 0 or 1 as well as in between
void mech_insert1(Section *sec, int type)
Symbol * hoc_table_lookup(const char *, Symlist *)
int hoc_is_object_arg(int narg)
void hoc_pushstr(char **d)
double * hoc_getarg(int narg)
void hoc_pushpx(double *d)
Symbol * hoc_install(const char *, int, double, Symlist **)
std::FILE * hoc_obj_file_arg(int i)
int hoc_is_str_arg(int narg)
int hoc_oc(const char *buf)
int hoc_is_double_arg(int narg)
void hoc_install_object_data_index(Symbol *sp)
Symbol * hoc_lookup(const char *)
int hoc_is_pdouble_arg(int narg)
void hoc_obj_unref(Object *obj)
void hoc_push_object(Object *d)
void hoc_push(neuron::container::generic_data_handle handle)
Point_process * ob2pntproc_0(Object *ob)
static void initial(neuron::model_sorted_token const &, NrnThread *nt, Memb_list *ml, int type)
Object ** hoc_objgetarg(int)
Symlist * hoc_top_level_symlist
double * vector_vec(IvocVect *v)
static const char * mechanism[]
int vector_capacity(IvocVect *v)
double nrn_rangevar_get(Symbol *sym, Section *sec, double x)
void nrn_section_length_set(Section *sec, const double length)
float nrn_get_plotshape_high(ShapePlotInterface *spi)
SectionListIterator * nrn_sectionlist_iterator_new(nrn_Item *my_sectionlist)
void nrn_section_pop(void)
void nrn_section_ref(Section *sec)
Symbol * nrn_symbol(char const *const name)
void nrn_property_push(Object *obj, const char *name)
double nrn_double_pop(void)
int nrn_try_catch_nest_depth
SymbolTableIterator * nrn_symbol_table_iterator_new(Symlist *my_symbol_table)
void nrn_section_rallbranch_set(Section *sec, double const val)
char * nrn_gargstr(int arg)
Object * nrn_object_pop(void)
bool nrn_is_object_arg(int arg)
double nrn_section_Ra_get(Section *sec)
void nrn_nseg_set(Section *const sec, const int nseg)
int nrn_nseg_get(const Section *sec)
Symlist * nrn_top_level_symbol_table(void)
float nrn_get_plotshape_low(ShapePlotInterface *spi)
void nrn_double_ptr_push(double *addr)
void nrn_section_unref(Section *sec)
bool nrn_prop_exists(const Object *obj)
void nrn_register_function(void(*proc)(), const char *func_name, int type)
int ivocmain_session(int, const char **, const char **, int start_session)
This used to be ivocmain, the main entrypoint to the HOC interpreter.
void nrn_method_call(Object *obj, Symbol *method_sym, int narg)
void nrn_symbol_table_iterator_free(SymbolTableIterator *st)
double nrn_property_array_get(const Object *obj, const char *name, int i)
int nrn_symbol_subtype(const Symbol *sym)
Symbol * nrn_method_symbol(const Object *obj, char const *const name)
int nrn_init(int argc, const char **argv)
Object * nrn_get_plotshape_section_list(ShapePlotInterface *spi)
void nrn_section_push(Section *sec)
Section * nrn_section_new(char const *const name)
bool nrn_symbol_is_array(const Symbol *sym)
nrn_Item * nrn_sectionlist_data(const Object *obj)
nrn_stack_types_t nrn_stack_type(void)
char const * nrn_symbol_name(const Symbol *sym)
bool nrn_is_double_arg(int arg)
void nrn_rangevar_set(Symbol *sym, Section *sec, double x, double value)
void nrn_section_Ra_set(Section *sec, double const val)
void simpleconnectsection()
std::FILE * nrn_obj_file_arg(int i)
const char * nrn_get_plotshape_varname(ShapePlotInterface *spi)
bool nrn_is_str_arg(int arg)
void nrn_stdout_redirect(int(*myprint)(int, char *))
Symbol * nrn_symbol_table_iterator_next(SymbolTableIterator *st)
int nrn_symbol_table_iterator_done(SymbolTableIterator *st)
Object ** nrn_objgetarg(int arg)
double nrn_property_get(const Object *obj, const char *name)
double nrn_section_length_get(Section *sec)
void nrn_rangevar_push(Symbol *sym, Section *sec, double x)
ShapePlotInterface * nrn_get_plotshape_interface(Object *ps)
void nrn_property_array_set(Object *obj, const char *name, int i, double value)
Object * nrn_object_new(Symbol *sym, int narg)
int nrn_function_call_nothrow(Symbol *sym, int narg, char *error_msg, size_t error_msg_size)
Symlist * nrn_symbol_table(const Symbol *sym)
double * nrn_double_ptr_pop(void)
char const * nrn_stack_type_name(nrn_stack_types_t id)
double * nrn_symbol_dataptr(const Symbol *sym)
void nrn_segment_diam_set(Section *const sec, const double x, const double diam)
nrn_Item * nrn_allsec(void)
Symlist * nrn_global_symbol_table(void)
void nrn_section_connect(Section *child_sec, double child_x, Section *parent_sec, double parent_x)
Object * hoc_newobj1(Symbol *, int)
double * nrn_vector_data(Object *vec)
Section * nrn_sectionlist_iterator_next(SectionListIterator *sl)
void nrn_property_array_push(Object *obj, const char *name, int i)
char const * nrn_secname(Section *sec)
void nrn_object_push(Object *obj)
int nrn_sectionlist_iterator_done(SectionListIterator *sl)
char const * nrn_class_name(const Object *obj)
int nrn_symbol_type(const Symbol *sym)
void nrn_object_ref(Object *obj)
void nrn_function_call(Symbol *sym, int narg)
int nrn_symbol_array_length(const Symbol *sym)
void nrn_property_set(Object *obj, const char *name, double value)
void nrnpy_set_pr_etal(int(*cbpr_stdoe)(int, char *), int(*cbpass)())
void nrn_object_unref(Object *obj)
char ** nrn_str_pop(void)
std::tuple< int, const char ** > nrn_mpi_setup(int argc, const char **argv)
A top-level initialization of MPI given argc and argv.
int nrn_vector_capacity(const Object *vec)
void nrn_double_push(double val)
double nrn_segment_diam_get(Section *const sec, const double x)
void nrn_sectionlist_iterator_free(SectionListIterator *sl)
bool nrn_section_is_active(const Section *sec)
int nrn_hoc_call(char const *const command)
void nrn_symbol_push(Symbol *sym)
void nrn_mechanism_insert(Section *sec, const Symbol *mechanism)
double nrn_section_rallbranch_get(const Section *sec)
double nrn_distance(Section *sec0, double x0, Section *sec1, double x1)
void nrn_str_push(char **str)
int nrn_method_call_nothrow(Object *obj, Symbol *method_sym, int narg, char *error_msg, size_t error_msg_size)
bool nrn_is_pdouble_arg(int arg)
double * nrn_getarg(int arg)
struct SymbolTableIterator SymbolTableIterator
struct SectionListIterator SectionListIterator
void section_ref(Section *)
double topol_distance(Section *, Node *, Section *, Node *, Section **, Node **)
void section_unref(Section *)
void nrn_length_change(Section *, double)
static Node * node(Object *)
Object ** hoc_objpop()
Pop pointer to object pointer and return top elem from stack.
int hoc_stack_type()
Get the type of the top entry.
void hoc_tobj_unref(Object **)
Objectdata * hoc_top_level_data
Symlist * hoc_built_in_symlist
static void execute_throw_on_exception(Symbol *sym, int narg)
double & param_legacy(int legacy_index)
SectionListIterator(nrn_Item *)
virtual const char * varname() const =0
virtual Object * neuron_section_list()=0
SymbolTableIterator(Symlist *)
A public face of hoc_Item.