nrnmenu.h

Go to the documentation of this file.
00001 #ifndef nrnmenu_h
00002 #define nrnmenu_h
00003 
00004 #include <OS/string.h>
00005 #include "ndatclas.h"
00006 #include <ivstream.h>
00007 class MechTypeImpl;
00008 
00009 class MechanismStandard : public Resource {
00010 public:
00011    MechanismStandard(const char*, int vartype);
00012    virtual ~MechanismStandard();
00013 
00014    void panel(const char* label = nil);
00015    void action(const char*);
00016 
00017    int count();
00018    const char* name();
00019    const char* name(int, int&); // returns array dimension and name
00020    
00021    // from arg (section.node(x) (0 if x < 0) to this
00022    void in(Section*, double x = -1.);
00023    void in(Point_process*);
00024    void in(MechanismStandard*);
00025    void set(const char*, double val, int arrayindex=0);
00026 
00027    // from this to segement containing x (uniformly if x < 0)
00028    void out(Section*, double x = -1.);
00029    void out(Point_process*);
00030    void out(MechanismStandard*);
00031    double get(const char*, int arrayindex=0);
00032 
00033    void save(const char*, ostream*); // for session files
00034    NrnProperty* np() { return np_; }
00035 private:
00036    NrnProperty* np_;
00037    int name_cnt_;
00038    int offset_;
00039    int vartype_;
00040    CopyString action_;
00041    Symbol** glosym_;
00042    void mschk(const char*);
00043 };
00044 
00045 class MechanismType : public Resource {
00046 public:
00047    MechanismType(boolean point_process);
00048    virtual ~MechanismType();
00049    boolean is_point();
00050    boolean is_netcon_target(int);
00051    boolean has_net_event(int);
00052    boolean is_artificial(int);
00053    void select(const char*);
00054    const char* selected();
00055    void insert(Section*);
00056    void remove(Section*);
00057    void point_process(Object**);
00058    void action(const char*);
00059    void menu();
00060 
00061    int count();
00062    int selected_item();
00063    int internal_type();
00064    void select(int);
00065 
00066    Point_process* pp_begin();
00067    Point_process* pp_next();
00068 private:
00069    MechTypeImpl* mti_;
00070 };
00071 
00072 #endif
Generated on Mon Jun 13 08:10:26 2011 for NEURON by  doxygen 1.6.3