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*);
43  void section_exist_info(Section*);
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*);
50  void netrecv_pp(Point_process*);
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 void d(int n, double &p)=0
size_t p
#define chk(i)
Definition: fmenu.cpp:189
virtual Type type()=0
virtual void s(char *cp, int chk=0)=0
void init()
Definition: init.cpp:169
static double cell(void *v)
Definition: ocbbs.cpp:573
int const size_t const size_t n
Definition: nrngsl.h:12
virtual void i(int &j, int chk=0)=0
size_t j
Definition: section.h:213
BBSS_IO * f
Definition: bbsavestate.h:30
virtual ~BBSS_IO()
Definition: bbsavestate.h:16
Definition: hocdec.h:226
static Node * node(Object *)
Definition: netcvode.cpp:318
Definition: section.h:132
virtual void skip(int)
Definition: bbsavestate.h:22