1 #include <../../nrnconf.h> 8 #include <nrnpython_config.h> 83 void found(
double*,
const char*,
Symbol*);
84 void found(
char**,
const char*,
Symbol*);
88 void search_vectors();
99 int size_, count_, found_so_far_;
103 #define sentinal 123456789.e15 194 pathstyle_ = pathstyle;
195 table_ =
new PathTable(size);
215 char** pstr = (
char**)
i.cur_key();
218 double* pd = (
double*)
i.cur_key();
224 if (pathstyle_ > 0) {
225 search(hoc_top_level_data, hoc_built_in_symlist);
226 search(hoc_top_level_data, hoc_top_level_symlist);
228 search(hoc_top_level_data, hoc_top_level_symlist);
229 search(hoc_top_level_data, hoc_built_in_symlist);
232 if (found_so_far_ < count_) {
236 if (found_so_far_ < count_) {
243 char** pstr = (
char**)
i.cur_key();
246 double* pd = (
double*)
i.cur_key();
255 if (pathstyle_ != 2) {
260 cnt = strlist_.count();
261 for (i=0; i<
cnt; ++
i) {
266 if (!table_->find(pv, v)) {
267 hoc_warning(
"table lookup failed for pointer for-", path);
277 if (!table_->find(pv, v)) {
310 if (sl)
for (sym = sl->
first; sym; sym = sym->
next) {
324 for (i=0; i < total; ++
i) {
328 found(pd + i, cs.
string(), sym);
338 found(pstr, cs.
string(), sym);
343 if (pathstyle_ > 0) {
break; }
346 for (i=0; i < total; ++
i)
if (obp[i] && ! obp[i]->recurse) {
353 strlist_.append((
char*)cs.
string());
357 strlist_.remove(strlist_.count()-1);
365 strlist_.append((
char*)cs.
string());
367 strlist_.remove(strlist_.count()-1);
378 for (i=0; i < total; ++
i) {
383 strlist_.append((
char*)cs.
string());
385 strlist_.remove(strlist_.count()-1);
398 strlist_.append((
char*)cs.
string());
408 strlist_.remove(strlist_.count()-1);
427 strlist_.append((
char*)cs.
string());
429 int size = vec->size();
431 for (i=0; i < size; ++
i) {
434 found(pd + i, buf, sym_vec);
437 strlist_.remove(strlist_.count()-1);
443 void HocDataPathImpl::search_pysec() {
450 strlist_.append((
char*)cs.
string());
452 strlist_.remove(strlist_.count()-1);
463 found(&sec->
prop->
dparam[4].
val,
"rallbranch", sym_rallbranch);
471 for (
int i = 0;
i < sec->
nnode; ++
i) {
481 found(&
NODEV(nd), buf, sym_v);
492 sprintf(buf,
"vext[%d](%g)", i, x);
494 found(&(nd->
extnode->
v[i]), buf, sym_vext);
501 for (p = nd->
prop; p; p = p->
next) {
522 for (k=0; k < kmax; ++
k) {
525 ir = psym->
u.
rng.index;
529 pd = prop->
param + ir;
532 for (i=0; i <
imax; ++
i) {
539 found(pd + i, buf, psym);
struct DLL * dll_load(char *filename)
declarePtrList(StringList, char)
size_t hoc_total_array_data(Symbol *s, Objectdata *obd)
HocDataPathImpl(int, int)
String * retrieve(double *)
declareTable(PathTable, void *, PathValue *)
struct Section * parentsec
void nrn_vecsim_remove(void *)
#define ITERATE(itm, lst)
double nrn_arc_position(Section *sec, Node *node)
Object ** object_pobj(Symbol *sym, Objectdata *od)
void found(double *, const char *, Symbol *)
Objectdata * hoc_top_level_data
void nrnbbs_context_wait()
static philox4x32_key_t k
sprintf(buf," if (secondorder) {\ " int _i;\" " for(_i=0;_i< %d;++_i) {\" " _p[_slist%d[_i]]+=dt *_p[_dlist%d[_i]];\" " }}\", numeqn, listnum, listnum)
const char * string() const
PathValue * found_v(void *, const char *, Symbol *)
Symlist * hoc_top_level_symlist
void hoc_assign_str(char **cpp, const char *buf)
double * object_pval(Symbol *sym, Objectdata *od)
implementTable(PathTable, void *, PathValue *)
HocStruct Symbol ** ppsym
hoc_Item ** object_psecitm(Symbol *sym, Objectdata *od)
const char * secname(Section *sec)
void hoc_warning(const char *, const char *)
#define ForAllSections(sec)
void *(* constructor)(struct Object *)
void * dll_lookup(struct DLL *Pdll, char *name)
Symlist * hoc_built_in_symlist
#define TableIterator(Table)
static Symbol * sym_rallbranch
struct Symbol::@52::@53 rng
HocDataPaths(int=1000, int pathstyle=0)
short cpublic
Note: public is a reserved keyword.
HocStruct cTemplate * ctemplate
Symbol * retrieve_sym(double *)
Symbol * hoc_table_lookup(const char *, Symlist *)
char ** object_pstr(Symbol *sym, Objectdata *od)
double * vector_vec(Vect *v)
implementPtrList(StringList, char)
char * hoc_araystr(Symbol *sym, int index, Objectdata *obd)
void nrn_vecsim_add(void *, bool)