NEURON
cabcode.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "options.h" // for EXTRACELLULAR
6 
7 struct Node;
8 struct Object;
9 struct Section;
10 struct Symbol;
11 struct Prop;
12 struct hoc_Item;
13 
14 double cable_prop_eval(Symbol* sym);
15 
16 // section on stack will be popped
18 
19 void oc_save_cabcode(int* a1, int* a2);
20 void oc_restore_cabcode(int* a1, int* a2);
21 
22 void nrn_initcode();
23 void nrn_pushsec(Section*);
26 void new_sections(Object* ob, Symbol* sym, hoc_Item** pitm, int size);
28 
29 #if USE_PYTHON
30 struct NPySecObj;
31 Section* nrnpy_newsection(NPySecObj*);
32 #endif
33 
34 int arc0at0(Section*);
35 double nrn_ra(Section*);
36 void cab_alloc(Prop*);
37 void morph_alloc(Prop* p);
38 double nrn_diameter(Node* nd);
39 double section_length(Section* sec);
41 
42 /// return 0 if no accessed section
44 
47 void ob_sec_access_push(hoc_Item* qsec);
48 void mech_insert1(Section* sec, int type);
51 Prop* nrn_mechanism(int type, Node* nd);
52 
53 /// returns prop given mech type, section, and inode error if mech not at this position
54 Prop* nrn_mechanism_check(int type, Section* sec, int inode);
56 int nrn_exists(Symbol* s, Node* node);
58 
59 /// return nullptr if failure instead of hoc_execerror and return pointer to the 0 element if an
60 /// array
62 
63 /// returns nearest index to x
64 int node_index(Section* sec, double x);
65 
66 /// return -1 if x at connection end, nnode-1 if at other end
67 int node_index_exact(Section* sec, double x);
68 void nrn_change_nseg(Section* sec, int n);
69 void cable_prop_assign(Symbol* sym, double* pd, int op);
70 
71 /* x of parent for this section */
73 
74 /* x=0,1 end connected to parent */
76 
80 void setup_topology();
81 
82 /// name of section (for use in error messages)
83 const char* secname(Section* sec);
84 
87 const char* sec_and_position(Section* sec, Node* nd);
88 int segment_limits(double*);
89 
90 /// like node_index but give proper node when x is 0 or 1 as well as in between
91 Node* node_exact(Section* sec, double x);
92 Node* node_ptr(Section* sec, double x, double* parea);
93 
94 /// returns location of property symbol
96 
97 /// returns location of property symbol, return nullptr instead of hoc_execerror
99  int indx,
100  Section* sec,
101  short inode,
102  int* err);
103 int has_membrane(char* mechanism_name, Section* sec);
104 
105 /// turn off section stack fixing (in case of return, continue, break in a section statement)
106 /// between explicit user level push_section, etc and pop_section
108 
110 
111 #if EXTRACELLULAR
112 double* nrn_vext_pd(Symbol* s, int indx, Node* nd);
113 #endif
void cab_alloc(Prop *)
Definition: cabcode.cpp:421
Section * chk_access()
Definition: cabcode.cpp:449
const char * secname(Section *sec)
name of section (for use in error messages)
Definition: cabcode.cpp:1674
void nrn_change_nseg(Section *sec, int n)
Definition: cabcode.cpp:1482
void oc_save_cabcode(int *a1, int *a2)
Definition: cabcode.cpp:117
neuron::container::generic_data_handle nrnpy_dprop(Symbol *s, int indx, Section *sec, short inode, int *err)
returns location of property symbol, return nullptr instead of hoc_execerror
Definition: cabcode.cpp:1933
void mech_uninsert1(Section *sec, Symbol *s)
Definition: cabcode.cpp:898
double * nrn_vext_pd(Symbol *s, int indx, Node *nd)
Definition: cabcode.cpp:1860
int node_index_exact(Section *sec, double x)
return -1 if x at connection end, nnode-1 if at other end
Definition: cabcode.cpp:1426
Node * node_ptr(Section *sec, double x, double *parea)
Definition: cabcode.cpp:1828
void nrn_parent_info(Section *s)
Definition: cabcode.cpp:1589
double nrn_arc_position(Section *sec, Node *node)
Definition: cabcode.cpp:1755
Section * nrn_noerr_access()
return 0 if no accessed section
Definition: cabcode.cpp:474
void new_sections(Object *ob, Symbol *sym, hoc_Item **pitm, int size)
Prop * hoc_getdata_range(int type)
Definition: cabcode.cpp:1065
int has_membrane(char *mechanism_name, Section *sec)
Definition: cabcode.cpp:2061
double cable_prop_eval(Symbol *sym)
Definition: cabcode.cpp:1447
void setup_topology()
Definition: cabcode.cpp:1635
Prop * nrn_mechanism(int type, Node *nd)
Definition: cabcode.cpp:1038
void nrn_rangeconst(Section *, Symbol *, neuron::container::data_handle< double > value, int op)
Definition: cabcode.cpp:935
void cable_prop_assign(Symbol *sym, double *pd, int op)
Definition: cabcode.cpp:1512
void morph_alloc(Prop *p)
Definition: cabcode.cpp:438
Section * nrn_sec_pop()
Definition: cabcode.cpp:753
void nrn_initcode()
Definition: cabcode.cpp:107
int segment_limits(double *)
Definition: cabcode.cpp:1784
double section_length(Section *sec)
Definition: cabcode.cpp:401
neuron::container::generic_data_handle nrnpy_rangepointer(Section *, Symbol *, double, int *, int)
return nullptr if failure instead of hoc_execerror and return pointer to the 0 element if an array
Definition: cabcode.cpp:1306
int node_index(Section *sec, double x)
returns nearest index to x
Definition: cabcode.cpp:1406
int nrn_sec2cell_equals(Section *sec, Object *obj)
Definition: cabcode.cpp:267
int nrn_exists(Symbol *s, Node *node)
Definition: cabcode.cpp:1258
double nrn_ra(Section *)
Definition: cabcode.cpp:417
neuron::container::data_handle< double > dprop(Symbol *s, int indx, Section *sec, short inode)
returns location of property symbol
Definition: cabcode.cpp:1922
Object * nrn_sec2cell(Section *sec)
Definition: cabcode.cpp:252
void nrn_pushsec(Section *)
Definition: cabcode.cpp:130
Prop * nrn_mechanism_check(int type, Section *sec, int inode)
returns prop given mech type, section, and inode error if mech not at this position
Definition: cabcode.cpp:1050
double nrn_diameter(Node *nd)
Definition: cabcode.cpp:444
void hoc_level_pushsec(Section *sec)
turn off section stack fixing (in case of return, continue, break in a section statement) between exp...
Definition: cabcode.cpp:2187
const char * sec_and_position(Section *sec, Node *nd)
Definition: cabcode.cpp:1773
neuron::container::data_handle< double > nrn_rangepointer(Section *sec, Symbol *s, double d)
Definition: cabcode.cpp:1274
void oc_restore_cabcode(int *a1, int *a2)
Definition: cabcode.cpp:122
void ob_sec_access_push(hoc_Item *qsec)
Definition: cabcode.cpp:827
double nrn_connection_position(Section *)
Definition: cabcode.cpp:1552
void nrn_disconnect(Section *sec)
Definition: cabcode.cpp:593
Section * nrn_trueparent(Section *)
Definition: cabcode.cpp:1577
char * hoc_section_pathname(Section *sec)
Definition: cabcode.cpp:1728
Node * node_exact(Section *sec, double x)
like node_index but give proper node when x is 0 or 1 as well as in between
Definition: cabcode.cpp:1800
void mech_insert1(Section *sec, int type)
Definition: cabcode.cpp:852
Section * section_new(Symbol *sym)
Creates a new section and registers with the global section list.
Definition: cabcode.cpp:323
int arc0at0(Section *)
Definition: cabcode.cpp:413
double * cable_prop_eval_pointer(Symbol *sym)
Definition: cabcode.cpp:1461
double nrn_section_orientation(Section *)
Definition: cabcode.cpp:1556
Section * nrn_section_exists(char *name, int indx, Object *cell)
Definition: cabcode.cpp:2218
int nrn_at_beginning(Section *sec)
Definition: cabcode.cpp:1560
#define sec
Definition: md1redef.h:20
static int indx
Definition: deriv.cpp:289
const char * name
Definition: init.cpp:16
static Node * node(Object *)
Definition: netcvode.cpp:291
int const size_t const size_t n
Definition: nrngsl.h:10
size_t p
s
Definition: multisend.cpp:521
short type
Definition: cabvars.h:10
static double cell(void *v)
Definition: ocbbs.cpp:540
static uint32_t value
Definition: scoprand.cpp:25
Definition: section.h:105
Definition: hocdec.h:173
Definition: section.h:231
Definition: model.h:47
Object * obj
Definition: hoclist.h:41
Symbol * sym
Definition: hoclist.h:39
Non-template stable handle to a generic value.