xapian-core  1.4.27
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Glass::Cursor Class Reference

#include <glass_cursor.h>

Public Member Functions

 Cursor ()
 Constructor. More...
 
 ~Cursor ()
 
uint8_t * init (unsigned block_size)
 
const uint8_t * clone (const Cursor &o)
 
void swap (Cursor &o)
 
void destroy ()
 
uint4refs () const
 
uint4 get_n () const
 Get the block number. More...
 
void set_n (uint4 n)
 
const uint8_t * get_p () const
 Get pointer to block. More...
 
uint8_t * get_modifiable_p (unsigned block_size)
 

Public Attributes

int c
 offset in the block's directory More...
 
bool rewrite
 true if the block is not the same as on disk, and so needs rewriting More...
 

Private Member Functions

 Cursor (const Cursor &)
 
Cursoroperator= (const Cursor &)
 

Private Attributes

char * data
 Pointer to reference counted data. More...
 

Detailed Description

Definition at line 40 of file glass_cursor.h.

Constructor & Destructor Documentation

◆ Cursor() [1/2]

Glass::Cursor::Cursor ( const Cursor )
private

◆ Cursor() [2/2]

Glass::Cursor::Cursor ( )
inline

Constructor.

Definition at line 50 of file glass_cursor.h.

◆ ~Cursor()

Glass::Cursor::~Cursor ( )
inline

Definition at line 52 of file glass_cursor.h.

References destroy().

Member Function Documentation

◆ clone()

const uint8_t* Glass::Cursor::clone ( const Cursor o)
inline

◆ destroy()

void Glass::Cursor::destroy ( )
inline

Definition at line 83 of file glass_cursor.h.

References data, refs(), and rewrite.

Referenced by clone(), GlassTable::close(), GlassCursor::rebuild(), and ~Cursor().

◆ get_modifiable_p()

uint8_t* Glass::Cursor::get_modifiable_p ( unsigned  block_size)
inline

Definition at line 121 of file glass_cursor.h.

References rare, and refs().

◆ get_n()

uint4 Glass::Cursor::get_n ( ) const
inline

Get the block number.

Returns BLK_UNUSED if no block is currently loaded.

Definition at line 101 of file glass_cursor.h.

References alignment_cast(), and Assert.

Referenced by GlassTableCheck::block_check(), GlassTableCheck::check(), GlassTable::commit(), GlassTable::next_for_sequential(), GlassTable::prev_for_sequential(), and GlassTableCheck::report_cursor().

◆ get_p()

const uint8_t* Glass::Cursor::get_p ( ) const
inline

Get pointer to block.

Returns NULL if no block is currently loaded.

Definition at line 116 of file glass_cursor.h.

References rare.

Referenced by GlassTableCheck::block_check(), GlassTable::next_default(), GlassTable::next_for_sequential(), and GlassTable::prev_default().

◆ init()

uint8_t* Glass::Cursor::init ( unsigned  block_size)
inline

◆ operator=()

Cursor& Glass::Cursor::operator= ( const Cursor )
private

◆ refs()

uint4& Glass::Cursor::refs ( ) const
inline

Definition at line 92 of file glass_cursor.h.

References alignment_cast(), Assert, and data.

Referenced by clone(), destroy(), get_modifiable_p(), and init().

◆ set_n()

void Glass::Cursor::set_n ( uint4  n)
inline

◆ swap()

void Glass::Cursor::swap ( Cursor o)
inline

Definition at line 77 of file glass_cursor.h.

References c, data, and rewrite.

Referenced by GlassCursor::rebuild().

Member Data Documentation

◆ c

int Glass::Cursor::c

◆ data

char* Glass::Cursor::data
private

Pointer to reference counted data.

Definition at line 46 of file glass_cursor.h.

Referenced by clone(), destroy(), refs(), and swap().

◆ rewrite

bool Glass::Cursor::rewrite

true if the block is not the same as on disk, and so needs rewriting

Definition at line 137 of file glass_cursor.h.

Referenced by GlassTable::block_to_cursor(), GlassTable::cancel(), destroy(), init(), GlassTableCheck::report_cursor(), and swap().


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