Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTSegment::MoveSegment

Moves a key segment.

Declaration

void CTSegment::MoveSegment(NINT newIndex);

Description

CTSegment::MoveSegment() moves a key segment to a location indicated by newIndex. newIndex indicates the relative position were the key segment should be moved to.

Return

void

Example


// move the last segment to first

CTIndex hIndex = hTable->GetIndex(0);

NINT count = hIndex->GetSegmentCount();

if (count > 0)

{

CTSegment hSeg = hIndex->GetSegment(count - 1);

hSeg->MoveSegment(0);

}

See Also

CTTable::MoveSegment(), CTIndex::MoveSegment()

TOCIndex