Last change
on this file was
7624,
checked in by westram, 14 years ago
|
- merge from dev [7473] [7474] [7475] [7476] [7477] [7478] [7479]
- NTREE
- rewrote main (CLI parsing, handling different ways to startup)
- some refactorings
- show com-error-reason on startyp ("THIS PROGRAM HAS PROBLEMS TO OPEN INTERCLIENT COMMUNICATION…")
- activated arb functions attributes
- added awt_execute_macro (execute a macro by name)
- added new CLI switch —execute (runs a macro after startup)
- DRYed load_and_startup_main_window vs start_main_window_after_import
- ARBDB
- gb_local_data keeps track of opened/closed DBs
- added GB_shell4perl (automatically closes all open databases on exit; macros working again)
- removed dead code (macro related)
|
File size:
2.2 KB
|
Line | |
---|
1 | // =============================================================== // |
---|
2 | // // |
---|
3 | // File : gb_localdata.h // |
---|
4 | // Purpose : // |
---|
5 | // // |
---|
6 | // Institute of Microbiology (Technical University Munich) // |
---|
7 | // http://www.arb-home.de/ // |
---|
8 | // // |
---|
9 | // =============================================================== // |
---|
10 | |
---|
11 | #ifndef GB_LOCALDATA_H |
---|
12 | #define GB_LOCALDATA_H |
---|
13 | |
---|
14 | #ifndef _GLIBCXX_CSTDDEF |
---|
15 | #include <cstddef> |
---|
16 | #endif |
---|
17 | #ifndef ARBTOOLS_H |
---|
18 | #include <arbtools.h> |
---|
19 | #endif |
---|
20 | |
---|
21 | struct GBDATA; |
---|
22 | struct GB_MAIN_TYPE; |
---|
23 | struct gb_compress_tree; |
---|
24 | struct gb_compress_list; |
---|
25 | |
---|
26 | struct gb_buffer { |
---|
27 | char *mem; |
---|
28 | size_t size; |
---|
29 | }; |
---|
30 | |
---|
31 | enum ARB_TRANS_TYPE { |
---|
32 | ARB_COMMIT, |
---|
33 | ARB_ABORT, |
---|
34 | ARB_TRANS |
---|
35 | }; |
---|
36 | |
---|
37 | struct gb_exitfun; |
---|
38 | |
---|
39 | class gb_local_data : virtual Noncopyable { |
---|
40 | // global data structure used for all open databases |
---|
41 | // @@@ could be moved into GB_shell |
---|
42 | |
---|
43 | GB_MAIN_TYPE **open_gb_mains; |
---|
44 | int open_gb_alloc; |
---|
45 | |
---|
46 | int openedDBs; |
---|
47 | int closedDBs; |
---|
48 | |
---|
49 | public: |
---|
50 | gb_buffer buf1, buf2; |
---|
51 | char *write_buffer; |
---|
52 | char *write_ptr; |
---|
53 | long write_bufsize; |
---|
54 | long write_free; |
---|
55 | int iamclient; |
---|
56 | int search_system_folder; |
---|
57 | |
---|
58 | gb_compress_tree *bituncompress; |
---|
59 | gb_compress_list *bitcompress; |
---|
60 | |
---|
61 | long bc_size; |
---|
62 | long gb_compress_keys_count; |
---|
63 | long gb_compress_keys_level; |
---|
64 | |
---|
65 | GB_MAIN_TYPE *gb_compress_keys_main; |
---|
66 | ARB_TRANS_TYPE running_client_transaction; |
---|
67 | struct { |
---|
68 | GBDATA *gb_main; |
---|
69 | } gbl; |
---|
70 | |
---|
71 | gb_exitfun *atgbexit; |
---|
72 | |
---|
73 | gb_local_data(); |
---|
74 | ~gb_local_data(); |
---|
75 | |
---|
76 | int open_dbs() const { return openedDBs-closedDBs; } |
---|
77 | |
---|
78 | void announce_db_open(GB_MAIN_TYPE *Main); |
---|
79 | void announce_db_close(GB_MAIN_TYPE *Main); |
---|
80 | GB_MAIN_TYPE *get_any_open_db() { int idx = open_dbs(); return idx ? open_gb_mains[idx-1] : NULL; } |
---|
81 | }; |
---|
82 | |
---|
83 | extern gb_local_data *gb_local; |
---|
84 | |
---|
85 | #else |
---|
86 | #error gb_localdata.h included twice |
---|
87 | #endif // GB_LOCALDATA_H |
---|
88 | |
---|
Note: See
TracBrowser
for help on using the repository browser.