sends::seg_db::linkage Class Reference
[Sends Data Classes]

Segment linkage class. More...

#include <segdb.hh>

List of all members.

Public Member Functions

 linkage (seg_index nSegs)
 Construct a linkage vector.
seg_index end (void) const
 Get the end segment index.
void insert_before (seg_index inx, seg_index iaft)
 Insert a segment into the linkage list.
void insert_after (seg_index inx, seg_index past)
 Insert a segment into the linkage list.
seg_index next (seg_index inx) const
 Get the next segment index.
bool null (seg_index inx) const
 test if index is null (equal to end()).
seg_index prev (seg_index inx) const
 Get the previous segment index.
void unlink (seg_index inx)
 Unlink a segment.


Detailed Description

Segment linkage class.

Segment linkage data contains a list with a foreward, and a back pointer for each segment. The "null" pointer is assigned to the backward pointer of the first element and foreward pointer of the last element of each list.


Constructor & Destructor Documentation

sends::seg_db::linkage::linkage ( seg_index  nSegs  )  [inline]

Construct a linkage vector.

Construct a linkage list with nSegs entries.

Parameters:
nSegs Initial number of entries for the list.


Member Function Documentation

seg_db::seg_index sends::seg_db::linkage::end ( void   )  const [inline]

Get the end segment index.

Get the end segment index. THis is used as the null pointer.

Returns:
Index of segment before the argument segment.

Referenced by sends::seg_db::qbase::next(), and sends::seg_db::qbase::prev().

void sends::seg_db::linkage::insert_before ( seg_index  inx,
seg_index  iaft 
) [inline]

Insert a segment into the linkage list.

Insert segment 'inx' into the linked list before segment iaft.

Parameters:
inx Index of segment to be inserted
iaft Segment in list before which the new segment will be inserted.

void sends::seg_db::linkage::insert_after ( seg_index  inx,
seg_index  past 
) [inline]

Insert a segment into the linkage list.

Insert segment 'inx' into the linked list after segment past.

Parameters:
inx Index of segment to be inserted
past Segment in list after which the new segment will be inserted.

seg_db::seg_index sends::seg_db::linkage::next ( seg_index  inx  )  const [inline]

Get the next segment index.

Get the index of the segment following the argument segment in the linked list.

Parameters:
inx Current segment index.
Returns:
Index of segment following the argument segment.

Referenced by sends::seg_db::qbase::next().

bool sends::seg_db::linkage::null ( seg_index  inx  )  const [inline]

test if index is null (equal to end()).

Test whether the specified index is null.

Parameters:
inx Index to be tested.
Returns:
True if index is null.

seg_db::seg_index sends::seg_db::linkage::prev ( seg_index  inx  )  const [inline]

Get the previous segment index.

Get the index of the segment before the argument segment in the linked list.

Parameters:
inx Current segment index.
Returns:
Index of segment before the argument segment.

Referenced by sends::seg_db::qbase::prev().

void sends::seg_db::linkage::unlink ( seg_index  inx  )  [inline]

Unlink a segment.

Remove the specified segment from the linked list. The previous and next segments in the list are linked together and both links for the specified segment are replaced by the null link value (end).

Parameters:
inx Index of the segment to be unlinked.


The documentation for this class was generated from the following file:

Generated on Tue Jun 10 12:18:12 2008 for SENDS by  doxygen 1.5.5