ARB
Macros | Functions
adindex.cxx File Reference
#include "gb_key.h"
#include "gb_undo.h"
#include "gb_index.h"
#include "gb_hashindex.h"
#include "gb_ts.h"
#include <arb_strbuf.h>
#include <cctype>
Include dependency graph for adindex.cxx:

Go to the source code of this file.

Macros

#define GB_INDEX_FIND(gbf, ifs, quark)
 

Functions

GB_ERROR GB_create_index (GBDATA *gbd, const char *key, GB_CASE case_sens, long estimated_size)
 
void gb_destroy_indices (GBCONTAINER *gbc)
 
GBDATAgb_index_find (GBCONTAINER *gbf, gb_index_files *ifs, GBQUARK quark, const char *val, GB_CASE case_sens, int after_index)
 
static chargb_set_undo_type (GBDATA *gb_main, GB_UNDO_TYPE type)
 
static void g_b_add_size_to_undo_entry (g_b_undo_entry *ue, long size)
 
static g_b_undo_entrynew_g_b_undo_entry (g_b_undo_list *u)
 
void gb_init_undo_stack (GB_MAIN_TYPE *Main)
 
static void delete_g_b_undo_entry (g_b_undo_entry *entry)
 
static void delete_g_b_undo_list (g_b_undo_list *u)
 
static void delete_g_b_undo_header (g_b_undo_header *uh)
 
static charg_b_check_undo_size2 (g_b_undo_header *uhs, long size, long max_cnt)
 
static charg_b_check_undo_size (GB_MAIN_TYPE *Main)
 
void gb_free_undo_stack (GB_MAIN_TYPE *Main)
 
static GB_ERROR undo_entry (g_b_undo_entry *ue)
 
static GB_ERROR g_b_undo (GBDATA *gb_main, g_b_undo_header *uh)
 
static GB_CSTR g_b_read_undo_key_pntr (GB_MAIN_TYPE *Main, g_b_undo_entry *ue)
 
static charg_b_undo_info (GB_MAIN_TYPE *Main, g_b_undo_header *uh)
 
static chargb_free_all_undos (GBDATA *gb_main)
 
chargb_set_undo_sync (GBDATA *gb_main)
 
chargb_disable_undo (GBDATA *gb_main)
 
void gb_check_in_undo_create (GB_MAIN_TYPE *Main, GBDATA *gbd)
 
void gb_check_in_undo_modify (GB_MAIN_TYPE *Main, GBDATA *gbd)
 
void gb_check_in_undo_delete (GB_MAIN_TYPE *Main, GBDATA *&gbd)
 
GB_ERROR GB_request_undo_type (GBDATA *gb_main, GB_UNDO_TYPE type)
 
GB_UNDO_TYPE GB_get_requested_undo_type (GBDATA *gb_main)
 
GB_ERROR GB_undo (GBDATA *gb_main, GB_UNDO_TYPE type)
 
charGB_undo_info (GBDATA *gb_main, GB_UNDO_TYPE type)
 
GB_ERROR GB_set_undo_mem (GBDATA *gbd, long memsize)
 

Macro Definition Documentation

#define GB_INDEX_FIND (   gbf,
  ifs,
  quark 
)
Value:
for (ifs = GBCONTAINER_IFS(gbf); \
ifs; \
ifs = GB_INDEX_FILES_NEXT(ifs)) \
{ \
if (ifs->key == quark) break; \
}
gb_index_files * GB_INDEX_FILES_NEXT(gb_index_files *ixf)
Definition: gb_index.h:87
GB_write_int const char GB_write_autoconv_string WRITE_SKELETON(write_pointer, GBDATA *,"%p", GB_write_pointer) char *AW_awa if)(!gb_var) return strdup("")
Definition: AW_awar.cxx:163
gb_index_files * GBCONTAINER_IFS(GBCONTAINER *gbc)
Definition: gb_index.h:94

Definition at line 21 of file adindex.cxx.

Referenced by GB_create_index(), gb_index_find(), GBENTRY::index_check_in(), and GBENTRY::index_check_out().

Function Documentation

GB_ERROR GB_create_index ( GBDATA gbd,
const char key,
GB_CASE  case_sens,
long  estimated_size 
)
void gb_destroy_indices ( GBCONTAINER gbc)
GBDATA* gb_index_find ( GBCONTAINER gbf,
gb_index_files ifs,
GBQUARK  quark,
const char val,
GB_CASE  case_sens,
int  after_index 
)
static char* gb_set_undo_type ( GBDATA gb_main,
GB_UNDO_TYPE  type 
)
static

Definition at line 318 of file adindex.cxx.

References GB_MAIN(), NULp, type, and GB_MAIN_TYPE::undo_type.

Referenced by gb_disable_undo(), and gb_set_undo_sync().

static void g_b_add_size_to_undo_entry ( g_b_undo_entry ue,
long  size 
)
static
static g_b_undo_entry* new_g_b_undo_entry ( g_b_undo_list u)
static
void gb_init_undo_stack ( GB_MAIN_TYPE Main)
static void delete_g_b_undo_entry ( g_b_undo_entry entry)
static
static void delete_g_b_undo_list ( g_b_undo_list u)
static
static void delete_g_b_undo_header ( g_b_undo_header uh)
static

Definition at line 376 of file adindex.cxx.

References delete_g_b_undo_list(), g_b_undo_list::next, NULp, and g_b_undo_header::stack.

Referenced by gb_free_undo_stack().

static char* g_b_check_undo_size2 ( g_b_undo_header uhs,
long  size,
long  max_cnt 
)
static
static char* g_b_check_undo_size ( GB_MAIN_TYPE Main)
static
void gb_free_undo_stack ( GB_MAIN_TYPE Main)
static GB_ERROR undo_entry ( g_b_undo_entry ue)
static
static GB_ERROR g_b_undo ( GBDATA gb_main,
g_b_undo_header uh 
)
static
static GB_CSTR g_b_read_undo_key_pntr ( GB_MAIN_TYPE Main,
g_b_undo_entry ue 
)
static

Definition at line 522 of file adindex.cxx.

References g_b_undo_entry::d, g_b_undo_entry::gs, g_b_undo_gbd::key, and quark2key().

Referenced by g_b_undo_info().

static char* g_b_undo_info ( GB_MAIN_TYPE Main,
g_b_undo_header uh 
)
static
static char* gb_free_all_undos ( GBDATA gb_main)
static
char* gb_set_undo_sync ( GBDATA gb_main)
char* gb_disable_undo ( GBDATA gb_main)
void gb_check_in_undo_create ( GB_MAIN_TYPE Main,
GBDATA gbd 
)
void gb_check_in_undo_modify ( GB_MAIN_TYPE Main,
GBDATA gbd 
)
void gb_check_in_undo_delete ( GB_MAIN_TYPE Main,
GBDATA *&  gbd 
)
GB_ERROR GB_request_undo_type ( GBDATA gb_main,
GB_UNDO_TYPE  type 
)

Define how to undo DB changes.

This function should be called just before opening a transaction, otherwise its effect will be delayed.

Possible types are: GB_UNDO_UNDO enable undo GB_UNDO_NONE disable undo GB_UNDO_KILL disable undo and remove old undos !!

Note: if GB_request_undo_type returns an error, local undo type remains unchanged

Definition at line 721 of file adindex.cxx.

References _GBCMC_UNDOCOM_REQUEST_NOUNDO, _GBCMC_UNDOCOM_REQUEST_UNDO, error(), GB_MAIN(), GB_UNDO_KILL, GB_UNDO_NONE, gbcmc_send_undo_commands(), GB_MAIN_TYPE::is_client(), NULp, GB_MAIN_TYPE::requested_undo_type, and type.

Referenced by ARB_main(), FINAL_TYPE< SEQTYPE >::ArbWriter(), cleanup_ptserver_database(), GB_optimize(), GB_undo(), gbcms_talking_undo(), GBT_compress_sequence_tree2(), and NT_create_main_window().

GB_UNDO_TYPE GB_get_requested_undo_type ( GBDATA gb_main)

Definition at line 749 of file adindex.cxx.

References GB_MAIN(), and GB_MAIN_TYPE::requested_undo_type.

Referenced by GB_optimize(), GB_undo(), and GBT_compress_sequence_tree2().

GB_ERROR GB_undo ( GBDATA gb_main,
GB_UNDO_TYPE  type 
)
char* GB_undo_info ( GBDATA gb_main,
GB_UNDO_TYPE  type 
)
GB_ERROR GB_set_undo_mem ( GBDATA gbd,
long  memsize 
)