NEURON
bbsavestate.h
Go to the documentation of this file.
1 #ifndef bbsavestate_h
2 #define bbsavestate_h
3 
4 struct Object;
5 struct Section;
6 struct Node;
7 struct Prop;
8 struct Point_process;
9 
10 // base class to allow either counting, reading, writing files, buffers, etc.
11 // All the BBSaveState methods take a BBSS_IO subclass and are merely iterators
12 class BBSS_IO {
13  public:
14  enum Type { IN, OUT, CNT };
15  BBSS_IO();
16  virtual ~BBSS_IO() {}
17  virtual void i(int& j, int chk = 0) = 0;
18  virtual void d(int n, double& p) = 0;
19  virtual void d(int n, double* p) = 0;
20  virtual void s(char* cp, int chk = 0) = 0;
21  virtual Type type() = 0;
22  virtual void skip(int) {} // only when reading
23 };
24 
25 class BBSaveState {
26  public:
27  BBSaveState();
28  virtual ~BBSaveState();
29  virtual void apply(BBSS_IO* io);
31 
32  int counts(int** gids, int** counts);
33  void core();
34  void init();
35  void finish();
36  void gids();
37  void gid2buffer(int gid, char* buffer, int size);
38  void buffer2gid(int gid, char* buffer, int size);
39  void gidobj(int basegid);
40  void gidobj(int spgid, Object*);
41  void cell(Object*);
42  int cellsize(Object*);
44  void section(Section*);
45  int sectionsize(Section*);
46  void seccontents(Section*);
47  void node(Node*);
48  void node01(Section*, Node*);
49  void mech(Prop*);
51  void possible_presyn(int gid);
52 
53  void mk_base2spgid();
54  void mk_pp2de();
55  void mk_presyn_info();
56  void del_pp2de();
57 };
58 
59 
60 #endif
virtual Type type()=0
virtual void d(int n, double &p)=0
virtual void d(int n, double *p)=0
virtual void s(char *cp, int chk=0)=0
virtual ~BBSS_IO()
Definition: bbsavestate.h:16
virtual void skip(int)
Definition: bbsavestate.h:22
virtual void i(int &j, int chk=0)=0
virtual void apply(BBSS_IO *io)
void node01(Section *, Node *)
void mk_presyn_info()
void mech(Prop *)
void node(Node *)
void del_pp2de()
void possible_presyn(int gid)
void cell(Object *)
void mk_base2spgid()
int cellsize(Object *)
void gid2buffer(int gid, char *buffer, int size)
void netrecv_pp(Point_process *)
BBSS_IO * f
Definition: bbsavestate.h:30
void section_exist_info(Section *)
void gidobj(int basegid)
int sectionsize(Section *)
virtual ~BBSaveState()
void buffer2gid(int gid, char *buffer, int size)
void seccontents(Section *)
int counts(int **gids, int **counts)
void section(Section *)
#define chk(i)
Definition: fmenu.cpp:193
int const size_t const size_t n
Definition: nrngsl.h:11
size_t p
size_t j
Definition: section.h:133
Definition: hocdec.h:227
Definition: section.h:214