1 #include <../../nrnconf.h> 27 static double l_substr(
void*) {
33 return double(p - s1);
41 return double(strlen(
gargstr(1)));
52 char*
buf =
new char[i+1];
104 IvocAliases* a = (IvocAliases*)ob->
aliases;
106 return a->lookup(name);
112 IvocAliases* a = (IvocAliases*)ob->
aliases;
120 IvocAliases* a = (IvocAliases*)ob->
aliases;
129 a =
new IvocAliases(ob);
131 sym = a->lookup(name);
136 sym = a->install(name);
152 IvocAliases* a = (IvocAliases*)ob->
aliases;
157 if (!st || st->
type != TEMPLATE) {
163 int id = (*po)->index;
181 if (!o) {
return nr; }
182 if (o->ctemplate->constructor) {
return nr; }
185 if (sl)
for (s = sl->
first; s; s = s->
next) {
188 for (i=0; i < total; ++
i) {
208 if (sl)
for (s = sl->
first; s; s = s->
next) {
211 for (i=0; i < total; ++
i) {
229 if (sl)
for (s = sl->
first; s; s = s->
next) {
230 if (s->
type == TEMPLATE) {
263 if (list->
object(i) == ob) {
277 if (nr == 0) {
return 0.; }
279 nr =
l_ref1(hoc_top_level_symlist, hoc_top_level_data, ob, nr);
280 nr =
l_ref0(hoc_top_level_symlist, ob, nr);
286 Printf(
" found %d of them\n", nr);
293 return double(ob ? ob->ctemplate->is_point_ : 0);
298 int type = ob ? ob->ctemplate->is_point_ : 0;
300 if (type == 0) {
return 0.; }
336 IvocAliases::IvocAliases(
Object* ob){
339 symtab_ =
new SymbolTable(20);
342 IvocAliases::~IvocAliases(){
355 if (!symtab_->find(sym, s)) {
363 sp->
name =
static_cast<char*
>(
emalloc(strlen(name)+1));
364 strcpy(sp->
name, name);
370 symtab_->insert(s, sp);
size_t hoc_total_array_data(Symbol *s, Objectdata *obd)
char * strstr(cs, ct) char *cs
implementTable(SymbolTable, String, Symbol *) static double l_substr(void *)
String left(int length) const
#define ITERATE(itm, lst)
static void l_destruct(void *)
Symbol * hoc_lookup(const char *)
static void * l_cons(Object *)
char * hoc_object_name(Object *ob)
static Member_func l_members[]
static int l_ref0(Symlist *sl, Object *ob, int nr)
static double l_head(void *)
char ** hoc_pgargstr(int narg)
static Object ** l_alias_list(void *)
static double l_alias(void *)
static double l_is_artificial(void *)
double * hoc_pgetarg(int narg)
static double l_is_point(void *)
const char * string() const
unsigned long key_to_hash(String &s)
static int l_ref3(Symbol *s, Object *ob, int nr)
Symbol * ivoc_alias_lookup(const char *name, Object *ob)
void hoc_assign_str(char **cpp, const char *buf)
void ivoc_free_alias(Object *ob)
Symlist * hoc_built_in_symlist
Objectdata * hoc_top_level_data
Object ** hoc_temp_objvar(Symbol *symtemp, void *v)
static double l_tail(void *)
static Member_ret_obj_func l_obj_members[]
void hoc_free_symspace(Symbol *)
String right(int start) const
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 remove(void *v)
static int l_ref1(Symlist *sl, Objectdata *data, Object *ob, int nr)
void hoc_execerror(const char *, const char *)
int BeginningOfMatch(int subexp=0)
char * emalloc(unsigned n)
void hoc_obj_ref(Object *obj)
Symlist * hoc_top_level_symlist
static double l_ref(void *)
static int l_ref2(Object *o, Object *ob, int nr)
#define TableIterator(Table)
short cpublic
Note: public is a reserved keyword.
void StringFunctions_reg()
static double l_right(void *)
HocStruct cTemplate * ctemplate
Symbol * hoc_table_lookup(const char *, Symlist *)
Object * hoc_newobj1(Symbol *, int)
int hoc_is_object_arg(int narg)
void hoc_pushstr(char **d)
virtual unsigned long hash() const
int Search(const char *text, int length, int index, int range)
int EndOfMatch(int subexp=0)
Object ** hoc_objgetarg(int)
static double l_len(void *)
int nrn_is_artificial(int)
double chkarg(int, double low, double high)
static int l_ref4(Symbol *s, Object *ob, int nr)
static double l_is_name(void *)
static double l_left(void *)