CTSegment.GetStatus
Retrieves the status of the segment object.
Declaration
ULONG CTSegment.GetStatus() const;
Description
CTSegment.GetStatus() retrieves the status of a segment object. The status of the segment handle is a bit map describing one or more changes that have occurred to the segment object.
Return
CTSegment.GetStatus() returns a bitmap of the following:
Value |
Symbolic Constant |
Explanation |
---|---|---|
0x00 |
CTDBISEG_OLD |
Original segment as read from file |
0x01 |
CTDBISEG_NEW |
Segment added or inserted |
0x02 |
CTDBISEG_DEL |
Original segment deleted |
0x04 |
CTDBISEG_MOVED |
Original segment moved |
0x10 |
CTDBISEG_MODE |
Segment mode changed |
0x20 |
CTDBISEG_FIELD |
Segment field changed |
Example
// if any segment of an index has changed, call alter table
for (i = 0; i < hIndex.GetSegmentCount(); i++)
{
CTSegment hSeg = hIndex.GetSegment(i);
if (hSeg.GetStatus() != CTDBISEG_OLD)
hTable.Alter(CTDB_ALTER_NORMAL);
}
See Also
CTField.GetStatus(), CTIndex.GetStatus()