xapian-core  1.4.27
Classes | Namespaces | Macros | Functions | Variables
glass_table.h File Reference

Btree implementation. More...

#include <xapian/constants.h>
#include <xapian/error.h>
#include "glass_freelist.h"
#include "glass_cursor.h"
#include "glass_defs.h"
#include "io_utils.h"
#include "noreturn.h"
#include "omassert.h"
#include "str.h"
#include "stringutils.h"
#include "wordaccess.h"
#include "common/compression_stream.h"
#include <algorithm>
#include <string>
+ Include dependency graph for glass_table.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Glass::Key
 
class  Glass::LeafItem_base< T >
 
class  Glass::LeafItem
 
class  Glass::LeafItem_wr
 
class  Glass::BItem_base< T >
 
class  Glass::BItem
 
class  Glass::BItem_wr
 
class  GlassTable
 Class managing a Btree table in a Glass database. More...
 

Namespaces

 Glass
 

Macros

#define GLASS_BTREE_MAX_KEY_LEN   255
 The largest possible value of a key_len. More...
 

Functions

uint4 Glass::REVISION (const uint8_t *b)
 
int Glass::GET_LEVEL (const uint8_t *b)
 
int Glass::MAX_FREE (const uint8_t *b)
 
int Glass::TOTAL_FREE (const uint8_t *b)
 
int Glass::DIR_END (const uint8_t *b)
 
void Glass::SET_REVISION (uint8_t *b, uint4 rev)
 
void Glass::SET_LEVEL (uint8_t *b, int x)
 
void Glass::SET_MAX_FREE (uint8_t *b, int x)
 
void Glass::SET_TOTAL_FREE (uint8_t *b, int x)
 
void Glass::SET_DIR_END (uint8_t *b, int x)
 
template<typename ITEM1 , typename ITEM2 >
int Glass::compare (ITEM1 a, ITEM2 b)
 Compare two items by their keys. More...
 
int Glass::compare (BItem a, BItem b)
 Compare two BItem objects by their keys. More...
 

Variables

const size_t Glass::BLOCK_CAPACITY = 4
 Even for items of at maximum size, it must be possible to get this number of items in a block. More...
 
const int Glass::BYTES_PER_BLOCK_NUMBER = 4
 
const int Glass::K1 = 1
 
const int Glass::I2 = 2
 
const int Glass::D2 = 2
 
const int Glass::X2 = 2
 
const int Glass::DIR_START = 11
 
const int Glass::I_COMPRESSED_BIT = 0x80
 
const int Glass::I_LAST_BIT = 0x40
 
const int Glass::I_FIRST_BIT = 0x20
 
const int Glass::I_MASK = (I_COMPRESSED_BIT|I_LAST_BIT|I_FIRST_BIT)
 
const int Glass::ITEM_SIZE_MASK = (0xffff &~ (I_MASK << 8))
 
const size_t Glass::MAX_ITEM_SIZE = (ITEM_SIZE_MASK + 3)
 
const int Glass::LEVEL_FREELIST = 254
 Freelist blocks have their level set to LEVEL_FREELIST. More...
 

Detailed Description

Btree implementation.

Definition in file glass_table.h.

Macro Definition Documentation

◆ GLASS_BTREE_MAX_KEY_LEN

#define GLASS_BTREE_MAX_KEY_LEN   255