1 #include <../../nrnconf.h> 49 class NrnSectionImpl {
60 NrnSectionImpl::~NrnSectionImpl() {
75 if (sym->
type == MECHANISM) {
85 Prop*
p, *p0 = 0, *p1;
91 for (; p0 !=
p; p0 = p1) {
112 return npi_->sym_->name;
120 return npi_->p_->type;
128 npi_->iterator_ = -1;
133 if (npi_->iterator_ >= npi_->sym_->s_varn) {
143 return npi_->sym_->
u.
ppsym[npi_->iterator_];
160 if (src && dest && src != dest && src->
type == dest->
type) {
164 for (i=0; i <
cnt; ++
i) {
168 n = sym->
u.
rng.index;
172 for (j=0; j < jmax; ++
j) {
180 for (
int i=0;
i <
n; ++
i) {
186 for (i=0; i <
cnt; ++
i) {
190 n = sym->
u.
rng.index;
191 for (j=0; j < jmax; ++
j) {
206 cnt = npi_->sym_->s_varn;
207 for (i=0; i <
cnt; ++
i) {
209 if (strcmp(sym->
name, name) == 0) {
217 if (s->
type != RANGEVAR) {
220 return s->
u.
rng.index;
225 return npi_->p_->ob->u.dataspace[prop_index(s)].pval +
index;
228 return npi_->p_->dparam[prop_index(s) +
index].pval;
230 return npi_->p_->param + prop_index(s) +
index;
242 sli_->itr_ = sli_->list_;
249 sli_->itr_ = sli_->list_->next;
254 if (sli_->itr_ == sli_->list_) {
258 sli_->itr_ = sli_->itr_->next;
270 NrnSection::NrnSection(
Section* sec) {
271 npi_ =
new NrnSectionImpl(sec);
273 NrnSection::~NrnSection() {
276 void NrnSection::section(
Section* sec) {
281 Section* NrnSection::section() {
287 bool NrnSection::is_mechanism(
type) {
291 double* NrnSection::var_pointer(
const char*
var) {
int var_type(Symbol *) const
size_t hoc_total_array_data(Symbol *s, Objectdata *obd)
Symlist * hoc_top_level_symlist
int prop_index(const Symbol *) const
Symlist * hoc_built_in_symlist
check_obj_type(o, "SectionList")
double * prop_pval(const Symbol *, int arrayindex=0) const
int nrn_vartype(Symbol *sym)
int const size_t const size_t n
HocStruct Symbol ** ppsym
Prop * prop_alloc(Prop **, int, Node *)
void nrn_pushsec(Section *sec)
void hoc_execerror(const char *, const char *)
void hoc_dec_refcount(Object **pobj)
static bool assign(Prop *src, Prop *dest, int vartype=0)
Prop * nrn_mechanism(int type, Node *nd)
void section_ref(Section *)
struct Symbol::@52::@53 rng
void single_prop_free(Prop *)
HocStruct cTemplate * ctemplate
void hoc_push_frame(Symbol *, int)
const char * name() const
Symbol * hoc_table_lookup(const char *, Symlist *)
double * hoc_val_pointer(const char *s)
static Node * node(Object *)
void section_unref(Section *)
Symbol * find(const char *rangevar)
double var(InputIterator begin, InputIterator end)