1 #include <../../nrnconf.h>
23 #include <nrnpython_config.h>
35 if (!
sec || !
sec->prop || !
sec->prop->dparam[0].sym) {
38 sym =
sec->prop->dparam[0].sym;
39 ob =
sec->prop->dparam[6].obj;
40 i =
sec->prop->dparam[5].i;
61 static double dummy(
void*
v) {
99 Printf(
"SectionRef[???].sec is a deleted section\n");
108 qsec =
sec->prop->dparam[8].itm;
109 if (
sec->prop->dparam[0].sym) {
127 Printf(
"The new name already exists and is not a SECTION or has a dimension > 1\n");
134 for (
i = 0;
i <
n; ++
i) {
136 Printf(
"Previously existing %s[%d] points to a section which is being deleted\n",
162 sec->prop->dparam[0].sym = sym;
164 sec->prop->dparam[6].obj =
nullptr;
167 for (
i = 0;
i < size; ++
i) {
176 qsec =
sec->prop->dparam[8].itm;
177 sec->prop->dparam[0].sym = sym;
178 sec->prop->dparam[5].i =
i;
179 sec->prop->dparam[6].obj =
nullptr;
184 printf(
"SectionRef[???}.rename");
185 i =
sec->prop->dparam[5].i;
192 printf(
"sec->prop->dparam[0].sym->name = %s\n", sym->
name);
196 printf(
"ob->u.dataspace[sym->u.oboff].psecitm = %lx\n", pitm);
198 printf(
"hoc_top_level_data[sym->u.oboff].psecitm = %lx\n", pitm);
205 printf(
"symbol array info ");
212 printf(
"dataspace array info ");
250 return (
double) (
sec->parentsec != (
Section*) 0);
267 return (
double) (
sec->prop != (
Prop*) 0);
350 for (
i = 0, s =
sec->child; i < index && s; s = s->sibling) {
371 int (*checkpoint)(
void**),
383 s->
type = SECTIONREF;
386 s->
type = SECTIONREF;
389 s->
type = SECTIONREF;
392 s->
type = SECTIONREF;
395 s->
type = SECTIONREF;
const char * secname(Section *sec)
Section * nrn_trueparent(Section *sec)
Section * chk_access(void)
Symbol * hoc_table_lookup(const char *, Symlist *)
void hoc_execerror(const char *, const char *)
Object * ivoc_list_item(Object *olist, int i)
size_t hoc_total_array_data(Symbol *s, Objectdata *obd)
int hoc_arayinfo_install(Symbol *sp, int nsub)
int ivoc_list_count(Object *)
void hoc_freearay(Symbol *sp)
Symbol * hoc_install(const char *, int, double, Symlist **)
Objectdata * hoc_objectdata
void hoc_warning(const char *, const char *)
char * hoc_object_name(Object *ob)
void hoc_install_object_data_index(Symbol *sp)
Symbol * hoc_lookup(const char *)
void * ecalloc(size_t n, size_t size)
Object ** hoc_objgetarg(int)
Symlist * hoc_top_level_symlist
Objectdata * hoc_top_level_data
char * emalloc(unsigned n)
void section_ref(Section *)
void section_unref(Section *)
void sec_free(hoc_Item *)
Section * nrn_secarg(int iarg)
int const size_t const size_t n
HOC interpreter function declarations (included by hocdec.h)
void SectionRef_reg(void)
static double s_has_parent(void *v)
Section * nrn_sectionref_steer(Section *sec, Symbol *sym, int *pnindex)
static double s_has_trueparent(void *v)
static Member_func members[]
static hoc_Item ** sec2pitm(Section *sec)
int nrn_secref_nchild(Section *sec)
static void destruct(void *v)
static double s_unname(void *v)
static void * cons(Object *ho)
static double s_rename(void *v)
static double s_nchild(void *v)
static double s_exists(void *v)
void class2oc(const char *, void *(*cons)(Object *), void(*destruct)(void *), Member_func *, int(*checkpoint)(void **), Member_ret_obj_func *, Member_ret_str_func *)
static double s_cas(void *v)
Symbol * nrn_trueparent_sym
struct Section * parentsec
HocStruct cTemplate * ctemplate
HocStruct hoc_Item ** psecitm