1 #include <../../nrnconf.h>
30 static const char**
make_m(
bool,
int&,
Symlist*,
char*,
char*);
40 static void check(
const char* s) {
58 int type = ob->ctemplate->symtable->last->subtype;
80 if (ob->ctemplate->steer) {
90 if (!pp || !pp->
prop) {
98 if (strcmp(
name,
"loc") == 0) {
99 int type = ob->ctemplate->symtable->last->subtype;
110 }
else if (strcmp(
name,
"has_loc") == 0) {
114 }
else if (strcmp(
name,
"get_loc") == 0) {
172 for (
i = 0;
i <
cnt; ++
i) {
180 for (
i = 0;
i <
cnt; ++
i) {
190 void(hm_alloc)(
Prop*),
192 Pvmi cur, jacob, stat, initialize;
222 char* parnames =
NULL;
224 parnames =
new char[strlen(
gargstr(3)) + 1];
229 if (classsym->
type != TEMPLATE) {
234 const char** m =
make_m(
true,
cnt, slist, mname, parnames);
238 for (sp = slist->
first; sp; sp = sp->
next) {
245 for (
i = 0;
i <
cnt; ++
i) {
261 char* parnames =
NULL;
263 parnames =
new char[strlen(
gargstr(2)) + 1];
268 if (classsym->
type != TEMPLATE) {
277 fprintf(stderr,
"%d object(s) of type %s already exist.\n", tp->
count, classsym->
name);
278 hoc_execerror(
"Can't make a template into a PointProcess when instances already exist", 0);
281 const char** m =
make_m(
false,
cnt, slist, classsym->
name, parnames);
323 for (
i = 0;
i <
cnt; ++
i) {
341 for (sp = slist->
first; sp; sp = sp->
next) {
342 if (sp->
type == VAR) {
349 const char** m =
new const char*[
cnt];
350 for (
i = 0;
i <
cnt; ++
i) {
359 cc =
new char[strlen(mname) + 1];
379 char *cp, *csp =
NULL;
381 for (cp = parnames; cp && *cp; cp = csp) {
382 csp = strchr(cp,
' ');
386 if (!isalpha(*csp)) {
399 cc =
new char[strlen(cp) + strlen(m[1]) + 20];
414 for (sp = slist->
first; sp; sp = sp->
next) {
423 for (
j = 1;
j < jmax; ++
j) {
432 cc =
new char[strlen(
buf) + 20];
void nrn_pushsec(Section *sec)
double nrn_arc_position(Section *sec, Node *node)
int nrn_get_mechtype(const char *mechname)
Section * chk_access(void)
Node * node_exact(Section *sec, double x)
Symbol * hoc_table_lookup(const char *, Symlist *)
sprintf(buf, " if (secondorder) {\n" " int _i;\n" " for (_i = 0; _i < %d; ++_i) {\n" " _p[_slist%d[_i]] += dt*_p[_dlist%d[_i]];\n" " }}\n", numeqn, listnum, listnum)
void register_mech(const char **, Pvmp, Pvmi, Pvmi, Pvmi, Pvmi, int, int)
void hoc_execerror(const char *, const char *)
void hoc_construct_point(Object *, int)
size_t hoc_total_array_data(Symbol *s, Objectdata *obd)
void * hoc_Ecalloc(size_t nmemb, size_t size)
Symbol * hoc_install(const char *, int, double, Symlist **)
double hoc_call_objfunc(Symbol *s, int narg, Object *ob)
void hoc_retpushx(double x)
char * hoc_object_name(Object *ob)
Symbol * hoc_lookup(const char *)
static void after_step(void *nt, Memb_list *ml, int type)
void hoc_unlink_symbol(Symbol *, Symlist *)
static void check_list(const char *s, Symlist *sl)
Point_process * ob2pntproc(Object *ob)
void print_symlist(const char *, Symlist *)
Object * hoc_new_opoint(int)
Point_process * ob2pntproc_0(Object *ob)
static void alloc_pnt(Prop *p)
static void initial(void *nt, Memb_list *ml, int type)
int special_pnt_call(Object *ob, Symbol *sym, int narg)
void hoc_free_list(Symlist **)
Object * hoc_newobj1(Symbol *, int)
static Object * last_created_pp_ob_
static void check(const char *s)
void nrn_loc_point_process(int, Point_process *, Section *, Node *)
int point_reg_helper(Symbol *)
Datum * hoc_look_inside_stack(int, int)
static const char ** make_m(bool, int &, Symlist *, char *, char *)
static HocMech * common_register(const char **m, Symbol *classsym, Symlist *slist, void(hm_alloc)(Prop *), int &type)
static void alloc_mech(Prop *p)
static void call(Symbol *s, Node *nd, Prop *p)
void hoc_link_symbol(Symbol *, Symlist *)
void(* Pvmi)(struct NrnThread *, Memb_list *, int)
static Node * node(Object *)
void * create_point_process(int, Object *)
double get_loc_point_process(void *)
void hoc_register_cvode(int i, nrn_ode_count_t cnt, nrn_ode_map_t map, Pvmi spec, Pvmi matsol)
short cpublic
Note: public is a reserved keyword.
HocStruct Symbol ** ppsym
struct Symbol::@37::@38 rng
HocStruct cTemplate * ctemplate
char * strstr(char *cs, char *ct)