source: tags/initial/ARBDB/adlundo.h

Last change on this file was 2, checked in by oldcode, 24 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1enum g_b_undo_entry_type {
2                GB_UNDO_ENTRY_TYPE_DELETED,
3                GB_UNDO_ENTRY_TYPE_CREATED,
4                GB_UNDO_ENTRY_TYPE_MODIFY,
5                GB_UNDO_ENTRY_TYPE_MODIFY_ARRAY
6        };
7
8struct g_b_undo_gbd_struct {
9        GBQUARK                 key;
10        struct gb_data_base_type *gbd;
11};
12
13struct g_b_undo_struct;
14struct g_b_undo_entry_struct {
15    struct g_b_undo_struct *father;
16    struct g_b_undo_entry_struct *next;
17    short type;
18    short flag;
19   
20    struct gb_data_base_type    *source;
21    int                         gbm_index;
22                        /* The original(changed element) or father */
23    long                                sizeof_this;
24    union {
25        struct gb_transaction_save *ts;
26        struct g_b_undo_gbd_struct gs;
27    } d;
28};     
29
30struct g_b_undo_header_struct;
31struct g_b_undo_struct {
32        struct g_b_undo_header_struct   *father;
33        struct g_b_undo_entry_struct    *entries;
34        struct g_b_undo_struct          *next;
35        long            time_of_day;    /* the begin of the transaction */
36        long            sizeof_this;    /* the size of one undo */
37};
38
39struct g_b_undo_header_struct {
40        struct g_b_undo_struct *stack;
41        long            sizeof_this;    /* the size of all existing undos */
42        long            nstack;         /* number of available undos */ 
43};
44
45struct g_b_undo_mgr_struct {
46        long                    max_size_of_all_undos;
47        struct g_b_undo_struct          *valid_u;
48        struct g_b_undo_header_struct   *u;     /* undo */
49        struct g_b_undo_header_struct   *r;     /* redo */
50};
51
52
Note: See TracBrowser for help on using the repository browser.