MutableBrassCursor Class Reference

#include <brass_cursor.h>

Inheritance diagram for MutableBrassCursor:

Inheritance graph
[legend]
Collaboration diagram for MutableBrassCursor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MutableBrassCursor (BrassTable *B_)
 Create a mutable cursor attached to a Btree.
bool del ()
 Delete the current key/tag pair, leaving the cursor on the next entry.


Detailed Description

Definition at line 249 of file brass_cursor.h.


Constructor & Destructor Documentation

MutableBrassCursor::MutableBrassCursor ( BrassTable B_  )  [inline]

Create a mutable cursor attached to a Btree.

A mutable cursor allows the items to be deleted.

Creates a cursor, which can be used to remember a position inside the B-tree. The position is simply the item (key and tag) to which the cursor points. A cursor is either positioned or unpositioned, and is initially unpositioned.

NB: You must not try to use a MutableBrassCursor after the Btree it is attached to is destroyed. It's safe to destroy the MutableBrassCursor after the Btree though, you just may not use the MutableBrassCursor.

Definition at line 264 of file brass_cursor.h.


Member Function Documentation

bool MutableBrassCursor::del (  ) 

Delete the current key/tag pair, leaving the cursor on the next entry.

Returns:
false if the cursor ends up unpositioned.

Definition at line 317 of file brass_cursor.cc.

References Assert, BrassCursor::B, BrassCursor::current_key, BrassCursor::find_entry_ge(), BrassCursor::is_after_end, BrassCursor::is_positioned, and BrassCursor::next().

Referenced by BrassPostListTable::merge_changes().


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

Documentation for Xapian (version 1.2.9).
Generated on 10 May 2012 by Doxygen 1.5.9.