2 // GROUPS passed recursive-aborts
4 typedef unsigned int DBflag; // for storing user flag value
5 typedef unsigned long DBoffset; // 32-bit unsigned integer
6 typedef DBoffset DBsize; // type for storing sizes of objects
7 typedef unsigned char DBbyte; // 8-bit unsigned char
12 DBbyte link[4]; // hold link in portable MSB first format
14 DBlink(DBoffset = 0, DBflag = 0);
15 DBlink &operator=(const DBlink &);
16 DBlink &operator=(DBoffset);
18 operator const DBbyte *() { return link; }
19 void set_flag() { link[0] |= 0x80; }
20 void reset_flag() { link[0] &= 0x7f; }
21 int test_flag() const { return (link[0] & 0x80) != 0; }
24 typedef DBlink DBsizerec; // hold data record size in portable format
27 const DBoffset DB_NULL = 0;
32 // offsets are stored with MSB in link[0]
33 DBlink l; // offset into link file of right child - MSB = red bit
34 DBlink r; // offset into link file of left child - MSB = delete
35 DBlink d; // offset into parallel data file - MSB = user flag
37 DBlinkrec():l(DB_NULL), r(DB_NULL), d(DB_NULL) {}
38 void make_red() // set link to red
40 void make_black() // set link to black
42 int is_red() const // indicates whether this is a red link
43 { return l.test_flag(); }
44 void set_discard() // set discard flag
46 void reset_discard() // reset discard flag
48 int is_discarded() const // check discard flag
49 { return r.test_flag(); }
50 void set_flag() // set user flag
52 void reset_flag() // reset user flag
54 int is_flag() const // check user flag
55 { return d.test_flag(); }
57 friend class DataBase;
60 class DBpathrec : public DBlinkrec
62 DBoffset offset; // offset of link record in LNK file
64 DBpathrec():offset(DB_NULL) { }
65 DBpathrec(DBoffset off, const DBlinkrec &lr):offset(off), DBlinkrec(lr) {}
66 operator DBoffset() { return offset; }
67 DBpathrec &operator=(DBoffset off) { offset = off; return *this; }
68 DBpathrec &operator=(const DBpathrec &pr)
69 { offset = pr.offset; (DBlinkrec)*this = (DBlinkrec)pr; return *this; }
71 friend class DataBase;
78 a = b;// { dg-error "" } non-lvalue in assignment.*