NEURON
nrnmenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "ndatclas.h"
4 class MechTypeImpl;
5 
6 class MechanismStandard: public Resource {
7  public:
8  MechanismStandard(const char*, int vartype);
9  virtual ~MechanismStandard();
10 
11  void panel(const char* label = NULL);
12  void action(const char*, Object* pyact);
13 
14  int count();
15  const char* name() const;
16  const char* name(int, int&) const; // returns array dimension and name
17  bool is_array(int) const;
18 
19  // from arg (section.node(x) (0 if x < 0) to this
20  void in(Section*, double x = -1.);
21  void in(Point_process*);
22  void in(MechanismStandard*);
23  void set(const char*, double val, int arrayindex = 0);
24 
25  // from this to segement containing x (uniformly if x < 0)
26  void out(Section*, double x = -1.);
27  void out(Point_process*);
28  void out(MechanismStandard*);
29  double get(const char*, int arrayindex = 0);
30 
31  void save(const char*, std::ostream*); // for session files
33  return np_;
34  }
35  Object* msobj_; // wraps 'this' and used as first arg for pyact_
36  private:
38  int name_cnt_;
39  int offset_;
40  int vartype_;
41  std::string action_;
44  void mschk(const char*);
45 };
46 
47 class MechanismType: public Resource {
48  public:
50  virtual ~MechanismType();
51  bool is_point();
52  bool is_netcon_target(int);
53  bool has_net_event(int);
54  bool is_artificial(int);
55  bool is_ion();
56  void select(const char*);
57  const char* selected();
58  void insert(Section*);
59  void remove(Section*);
60  void point_process(Object**);
61  void action(const char*, Object* pyact);
62  void menu();
63 
64  int count();
65  int selected_item();
66  int internal_type();
67  void select(int);
68 
71 
72  Object* mtobj_; // wraps 'this' and used as first arg for pyact_
73  private:
75 };
std::string action_
Definition: nrnmenu.h:41
void mschk(const char *)
Definition: nrnmenu.cpp:902
void in(Section *, double x=-1.)
Definition: nrnmenu.cpp:847
virtual ~MechanismStandard()
Definition: nrnmenu.cpp:716
void out(Section *, double x=-1.)
Definition: nrnmenu.cpp:865
MechanismStandard(const char *, int vartype)
Definition: nrnmenu.cpp:676
NrnProperty * np_
Definition: nrnmenu.h:37
Object * msobj_
Definition: nrnmenu.h:35
void save(const char *, std::ostream *)
Definition: nrnmenu.cpp:887
NrnProperty * np()
Definition: nrnmenu.h:32
void action(const char *, Object *pyact)
Definition: nrnmenu.cpp:817
const char * name() const
Definition: nrnmenu.cpp:732
void set(const char *, double val, int arrayindex=0)
Definition: nrnmenu.cpp:825
double get(const char *, int arrayindex=0)
Definition: nrnmenu.cpp:834
Object * pyact_
Definition: nrnmenu.h:42
bool is_array(int) const
Definition: nrnmenu.cpp:728
Symbol ** glosym_
Definition: nrnmenu.h:43
void panel(const char *label=NULL)
Definition: nrnmenu.cpp:746
void point_process(Object **)
Definition: nrnmenu.cpp:1283
virtual ~MechanismType()
Definition: nrnmenu.cpp:1172
const char * selected()
Definition: nrnmenu.cpp:1262
Point_process * pp_begin()
Definition: nrnmenu.cpp:1183
Object * mtobj_
Definition: nrnmenu.h:72
bool is_netcon_target(int)
Definition: nrnmenu.cpp:1229
void remove(Section *)
Definition: nrnmenu.cpp:1275
MechanismType(bool point_process)
Definition: nrnmenu.cpp:1150
Point_process * pp_next()
Definition: nrnmenu.cpp:1202
void select(const char *)
Definition: nrnmenu.cpp:1254
int selected_item()
Definition: nrnmenu.cpp:1330
bool is_point()
Definition: nrnmenu.cpp:1179
int internal_type()
Definition: nrnmenu.cpp:1266
MechTypeImpl * mti_
Definition: nrnmenu.h:74
bool is_artificial(int)
Definition: nrnmenu.cpp:1245
bool has_net_event(int)
Definition: nrnmenu.cpp:1234
void insert(Section *)
Definition: nrnmenu.cpp:1270
void action(const char *, Object *pyact)
Definition: nrnmenu.cpp:1290
bool is_ion()
Definition: nrnmenu.cpp:1250
#define NULL
Definition: spdefs.h:105
Definition: hocdec.h:173
A point process is computed just like regular mechanisms.
Definition: section_fwd.hpp:77
Definition: model.h:47