ARB
Main Page
Namespaces
Classes
Files
File List
File Members
ARBDB
gb_undo.h
Go to the documentation of this file.
1
// =============================================================== //
2
// //
3
// File : gb_undo.h //
4
// Purpose : //
5
// //
6
// Institute of Microbiology (Technical University Munich) //
7
// http://www.arb-home.de/ //
8
// //
9
// =============================================================== //
10
11
#ifndef GB_UNDO_H
12
#define GB_UNDO_H
13
14
#ifndef GB_LOCAL_H
15
#include "
gb_local.h
"
16
#endif
17
18
struct
gb_transaction_save
;
19
struct
g_b_undo_list
;
20
21
enum
g_b_undo_entry_type
{
22
GB_UNDO_ENTRY_TYPE_DELETED
,
23
GB_UNDO_ENTRY_TYPE_CREATED
,
24
GB_UNDO_ENTRY_TYPE_MODIFY
,
25
GB_UNDO_ENTRY_TYPE_MODIFY_ARRAY
26
};
27
28
struct
g_b_undo_gbd
{
29
GBQUARK
key
;
30
GBDATA
*
gbd
;
31
};
32
33
struct
g_b_undo_entry
{
34
g_b_undo_list
*
father
;
35
g_b_undo_entry
*
next
;
36
short
type
;
37
short
flag
;
38
39
GBDATA
*
source
;
// The original(changed) element or father(of deleted)
40
int
gbm_index
;
41
long
sizeof_this
;
42
union
{
43
gb_transaction_save
*
ts
;
44
g_b_undo_gbd
gs
;
45
}
d
;
46
};
47
48
struct
g_b_undo_header
{
49
g_b_undo_list
*
stack
;
50
long
sizeof_this
;
// the size of all existing undos
51
long
nstack
;
// number of available undos
52
};
53
54
struct
g_b_undo_list
{
55
g_b_undo_header
*
father
;
56
g_b_undo_entry
*
entries
;
57
g_b_undo_list
*
next
;
58
long
time_of_day
;
// the begin of the transaction
59
long
sizeof_this
;
// the size of one undo
60
};
61
62
struct
g_b_undo_mgr
{
63
long
max_size_of_all_undos
;
64
g_b_undo_list
*
valid_u
;
65
g_b_undo_header
*
u
;
// undo
66
g_b_undo_header
*
r
;
// redo
67
};
68
69
#else
70
#error gb_undo.h included twice
71
#endif // GB_UNDO_H
g_b_undo_entry::gs
g_b_undo_gbd gs
Definition:
gb_undo.h:44
g_b_undo_mgr::max_size_of_all_undos
long max_size_of_all_undos
Definition:
gb_undo.h:63
g_b_undo_header::stack
g_b_undo_list * stack
Definition:
gb_undo.h:49
g_b_undo_header::nstack
long nstack
Definition:
gb_undo.h:51
g_b_undo_mgr::r
g_b_undo_header * r
Definition:
gb_undo.h:66
g_b_undo_entry::type
short type
Definition:
gb_undo.h:36
GB_UNDO_ENTRY_TYPE_DELETED
Definition:
gb_undo.h:22
GB_UNDO_ENTRY_TYPE_MODIFY
Definition:
gb_undo.h:24
g_b_undo_entry::next
g_b_undo_entry * next
Definition:
gb_undo.h:35
g_b_undo_list::next
g_b_undo_list * next
Definition:
gb_undo.h:57
g_b_undo_entry::father
g_b_undo_list * father
Definition:
gb_undo.h:34
GBDATA
Definition:
gb_data.h:129
gb_transaction_save
Definition:
gb_ts.h:41
g_b_undo_header
Definition:
gb_undo.h:48
gb_local.h
GB_UNDO_ENTRY_TYPE_MODIFY_ARRAY
Definition:
gb_undo.h:25
g_b_undo_entry::d
union g_b_undo_entry::@5 d
g_b_undo_list
Definition:
gb_undo.h:54
g_b_undo_entry::sizeof_this
long sizeof_this
Definition:
gb_undo.h:41
g_b_undo_list::sizeof_this
long sizeof_this
Definition:
gb_undo.h:59
g_b_undo_list::time_of_day
long time_of_day
Definition:
gb_undo.h:58
g_b_undo_mgr::valid_u
g_b_undo_list * valid_u
Definition:
gb_undo.h:64
g_b_undo_entry::gbm_index
int gbm_index
Definition:
gb_undo.h:40
g_b_undo_entry_type
g_b_undo_entry_type
Definition:
gb_undo.h:21
g_b_undo_entry::ts
gb_transaction_save * ts
Definition:
gb_undo.h:43
g_b_undo_list::entries
g_b_undo_entry * entries
Definition:
gb_undo.h:56
g_b_undo_entry::flag
short flag
Definition:
gb_undo.h:37
GB_UNDO_ENTRY_TYPE_CREATED
Definition:
gb_undo.h:23
g_b_undo_gbd::key
GBQUARK key
Definition:
gb_undo.h:29
g_b_undo_mgr
Definition:
gb_undo.h:62
g_b_undo_header::sizeof_this
long sizeof_this
Definition:
gb_undo.h:50
g_b_undo_mgr::u
g_b_undo_header * u
Definition:
gb_undo.h:65
g_b_undo_gbd::gbd
GBDATA * gbd
Definition:
gb_undo.h:30
g_b_undo_entry::source
GBDATA * source
Definition:
gb_undo.h:39
int
g_b_undo_gbd
Definition:
gb_undo.h:28
g_b_undo_entry
Definition:
gb_undo.h:33
g_b_undo_list::father
g_b_undo_header * father
Definition:
gb_undo.h:55
Generated by
1.8.8