1 #include <../../nrnconf.h> 22 #include <nrnpython_config.h> 60 static double dummy(
void*
v) {
100 Printf(
"SectionRef[???].sec is a deleted section\n");
128 Printf(
"The new name already exists and is not a SECTION or has a dimension > 1\n");
135 for (i=0; i <
n; ++
i) {
137 Printf(
"Previously existing %s[%d] points to a section which is being deleted\n", sym->
name, i);
146 sym =
hoc_install(name, SECTION, 0., &hoc_top_level_symlist);
164 for (i=0; i < size; ++
i) {
181 printf(
"SectionRef[???}.rename");
189 printf(
"sec->prop->dparam[0].sym->name = %s\n", sym->
name);
193 printf(
"ob->u.dataspace[sym->u.oboff].psecitm = %lx\n", pitm);
195 printf(
"hoc_top_level_data[sym->u.oboff].psecitm = %lx\n", pitm);
202 printf(
"symbol array info ");
203 for (j=0; j < a->
nsub; ++
j) {
209 printf(
"dataspace array info ");
210 for (j=0; j < a->
nsub; ++
j) {
264 return (
double)(sec->
prop != (
Prop*)0);
299 if (sym == nrn_parent_sym) {
310 }
else if (sym == nrn_trueparent_sym) {
321 }
else if (sym == nrn_root_sym) {
323 }
else if (sym == nrn_child_sym) {
336 for (i=0, s = sec->
child; i < index && s; s = s->sibling) {
339 if (i != index || !s) {
359 int (*checkpoint)(
void **),
372 s->
type = SECTIONREF;
375 s->
type = SECTIONREF;
378 s->
type = SECTIONREF;
379 nrn_trueparent_sym =
s;
381 s->
type = SECTIONREF;
384 s->
type = SECTIONREF;
size_t hoc_total_array_data(Symbol *s, Objectdata *obd)
void * ecalloc(size_t n, size_t size)
static double s_has_trueparent(void *v)
static double s_has_parent(void *v)
static double s_cas(void *v)
Symbol * nrn_trueparent_sym
struct Section * parentsec
static hoc_Item ** sec2pitm(Section *sec)
Symbol * hoc_lookup(const char *)
char * hoc_object_name(Object *ob)
Objectdata * hoc_top_level_data
Symbol * hoc_install(const char *, int, double, Symlist **)
Symlist * hoc_top_level_symlist
int const size_t const size_t n
static void * cons(Object *ho)
Objectdata * hoc_objectdata
static double s_rename(void *v)
void sec_free(hoc_Item *)
int hoc_arayinfo_install(Symbol *sp, int nsub)
const char * secname(Section *sec)
void hoc_warning(const char *, const char *)
void hoc_execerror(const char *, const char *)
int ivoc_list_count(Object *)
Section * nrn_secarg(int iarg)
int nrn_secref_nchild(Section *sec)
static double s_unname(void *v)
char * emalloc(unsigned n)
void SectionRef_reg(void)
void section_ref(Section *)
static void destruct(void *v)
void hoc_install_object_data_index(Symbol *sp)
HocStruct hoc_Item ** psecitm
HocStruct cTemplate * ctemplate
Symbol * hoc_table_lookup(const char *, Symlist *)
void class2oc(const char *, void *(*cons)(Object *), void(*destruct)(void *), Member_func *, int(*checkpoint)(void **), Member_ret_obj_func *, Member_ret_str_func *)
void hoc_freearay(Symbol *sp)
Section * nrn_trueparent(Section *sec)
static Member_func members[]
void section_unref(Section *)
Object * ivoc_list_item(Object *, int)
Object ** hoc_objgetarg(int)
static double s_nchild(void *v)
Section * chk_access(void)
Section * nrn_sectionref_steer(Section *sec, Symbol *sym, int *pnindex)
static double s_exists(void *v)