NEURON
nrnmenu.h
Go to the documentation of this file.
1 #ifndef nrnmenu_h
2 #define nrnmenu_h
3 
4 #include <OS/string.h>
5 #include "ndatclas.h"
6 #include <ivstream.h>
7 class MechTypeImpl;
8 
9 class MechanismStandard : public Resource {
10 public:
11  MechanismStandard(const char*, int vartype);
12  virtual ~MechanismStandard();
13 
14  void panel(const char* label = NULL);
15  void action(const char*, Object* pyact);
16 
17  int count();
18  const char* name();
19  const char* name(int, int&); // returns array dimension and name
20 
21  // from arg (section.node(x) (0 if x < 0) to this
22  void in(Section*, double x = -1.);
23  void in(Point_process*);
24  void in(MechanismStandard*);
25  void set(const char*, double val, int arrayindex=0);
26 
27  // from this to segement containing x (uniformly if x < 0)
28  void out(Section*, double x = -1.);
29  void out(Point_process*);
30  void out(MechanismStandard*);
31  double get(const char*, int arrayindex=0);
32 
33  void save(const char*, std::ostream*); // for session files
34  NrnProperty* np() { return np_; }
35  Object* msobj_; // wraps 'this' and used as first arg for pyact_
36 private:
38  int name_cnt_;
39  int offset_;
40  int vartype_;
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  void select(const char*);
56  const char* selected();
57  void insert(Section*);
58  void remove(Section*);
59  void point_process(Object**);
60  void action(const char*, Object* pyact);
61  void menu();
62 
63  int count();
64  int selected_item();
65  int internal_type();
66  void select(int);
67 
68  Point_process* pp_begin();
69  Point_process* pp_next();
70 
71  Object* mtobj_; // wraps 'this' and used as first arg for pyact_
72 private:
74 };
75 
76 #endif
NrnProperty * np_
Definition: nrnmenu.h:37
MechanismStandard(const char *, int vartype)
Definition: nrnmenu.cpp:669
Object * msobj_
Definition: nrnmenu.h:35
Object * mtobj_
Definition: nrnmenu.h:71
static int point_process
Definition: nrnunit.cpp:11
void in(Section *, double x=-1.)
Definition: nrnmenu.cpp:824
const char * name()
Definition: nrnmenu.cpp:723
void save(const char *, std::ostream *)
Definition: nrnmenu.cpp:864
Symbol ** glosym_
Definition: nrnmenu.h:43
int val
Definition: dll.cpp:167
static double insert(void *v)
Definition: tqueue.cpp:22
CopyString action_
Definition: nrnmenu.h:41
void panel(const char *label=NULL)
Definition: nrnmenu.cpp:737
void mschk(const char *)
Definition: nrnmenu.cpp:882
Definition: model.h:57
Object * pyact_
Definition: nrnmenu.h:42
void out(Section *, double x=-1.)
Definition: nrnmenu.cpp:842
NrnProperty * np()
Definition: nrnmenu.h:34
Definition: hocdec.h:226
MechTypeImpl * mti_
Definition: nrnmenu.h:73
void action(const char *, Object *pyact)
Definition: nrnmenu.cpp:794
virtual ~MechanismStandard()
Definition: nrnmenu.cpp:711
return NULL
Definition: cabcode.cpp:461