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

Linked list anchor. More...

#include <segdb.hh>

List of all members.

Public Member Functions

 qbase (seg_index N)
 Contruct a qbase.
 ~qbase (void)
 Destructor.
seg_index first (void) const
 Get first entry index.
void insert (seg_index iseg, seg_index ib4, linkage &l)
 Insert an entry.
void insert_int (seg_index iseg, seg_index ib4, linkage &l)
 Insert an entry.
seg_index last (void) const
 Get last entry index.
seg_index next (seg_index iseg, const linkage &l) const
 Get next entry index.
seg_index prev (seg_index iseg, const linkage &l) const
 Get previous entry index.
void read_lock (void) const
 Lock for read access.
thread::readwritelock & ref_mutex (void) const
 Return reference to the mutex.
void remove (seg_index iseg, linkage &l)
 Remove an entry.
void unlock (void) const
 Unlock access.
void write_lock (void)
 Lock for write access.


Detailed Description

Linked list anchor.

The queue base class containes first and last pointers to anchor a linked list.


Constructor & Destructor Documentation

sends::seg_db::qbase::qbase ( seg_index  N  )  [inline]

Contruct a qbase.

Construct a queue base using N as the null value.

Parameters:
N Null pointer value.

sends::seg_db::qbase::~qbase ( void   )  [inline]

Destructor.

Destroy the queue base.


Member Function Documentation

seg_db::seg_index sends::seg_db::qbase::first ( void   )  const [inline]

Get first entry index.

Get the index of the first entry in the list.

Returns:
Index of first entry in the list.

void sends::seg_db::qbase::insert ( seg_index  iseg,
seg_index  ib4,
linkage l 
)

Insert an entry.

Insert an entry into the specified linkage list before the specified entry. The queue is write locked while the insertion operation is being performed.

Parameters:
iseg Index of segment to be inserted.
ib4 Position in the list.
l Linkage list.

void sends::seg_db::qbase::insert_int ( seg_index  iseg,
seg_index  ib4,
linkage l 
)

Insert an entry.

Insert an entry into the specified linkage list before the specified entry. No write lock is performed.

Parameters:
iseg Index of segment to be inserted.
ib4 Position in the list.
l Linkage list.

seg_db::seg_index sends::seg_db::qbase::last ( void   )  const [inline]

Get last entry index.

Get the index of the last entry in the list.

Returns:
Index of last entry in the list.

seg_db::seg_index sends::seg_db::qbase::next ( seg_index  iseg,
const linkage l 
) const [inline]

Get next entry index.

Get the index of the next entry in the list.

Parameters:
iseg Index of current segment
l Linkage vector.
Returns:
Index of last entry in the list.

References sends::seg_db::linkage::end(), and sends::seg_db::linkage::next().

seg_db::seg_index sends::seg_db::qbase::prev ( seg_index  iseg,
const linkage l 
) const [inline]

Get previous entry index.

Get the index of the previous entry in the list.

Parameters:
iseg Index of current segment
l Linkage vector.
Returns:
Index of previous entry in the list.

References sends::seg_db::linkage::end(), and sends::seg_db::linkage::prev().

void sends::seg_db::qbase::read_lock ( void   )  const

Lock for read access.

Lock the segment queue for read access.

thread::readwritelock & sends::seg_db::qbase::ref_mutex ( void   )  const [inline]

Return reference to the mutex.

Return a reference to the read/write queue access mutex.

Returns:
Reference to the mutex.

void sends::seg_db::qbase::remove ( seg_index  iseg,
linkage l 
)

Remove an entry.

Remove the specified entry from the specified list.

Parameters:
iseg segment to be removed.
l Linkage list from which the entry will be removed.

void sends::seg_db::qbase::unlock ( void   )  const

Unlock access.

Unlock the segment queue.

void sends::seg_db::qbase::write_lock ( void   ) 

Lock for write access.

Lock the segment queue for write access.


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