CUBRID Engine  latest
file_hash.h File Reference
#include "config.h"
#include "error_manager.h"
#include "oid.h"
Include dependency graph for file_hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fh_info
 
struct  fh_entry
 
struct  fh_page_hdr
 
struct  fh_table
 

Macros

#define fh_oidk_key   fh_key_data.fh_oidkey.key
 
#define fh_oidk_data   fh_key_data.fh_oidkey.data
 
#define fh_intk_key   fh_key_data.fh_intkey.key
 
#define fh_intk_data   fh_key_data.fh_intkey.data
 
#define INVALID_FILE_POS   (FH_FILE_POS)~0
 

Typedefs

typedef struct fh_info FH_INFO
 
typedef unsigned int FH_FILE_POS
 
typedef struct fh_entry FH_ENTRY
 
typedef struct fh_entryFH_ENTRY_PTR
 
typedef struct fh_page_hdr FH_PAGE_HDR
 
typedef unsigned int(* HASH_FUNC) (const void *info, unsigned int htsize)
 
typedef int(* CMP_FUNC) (const void *key1, const void *key2)
 
typedef struct fh_table FH_TABLE
 
typedef void * FH_KEY
 
typedef void * FH_DATA
 

Enumerations

enum  FH_KEY_TYPE { FH_OID_KEY = 1, FH_INT_KEY = 2 }
 

Functions

FH_TABLEfh_create (const char *, int, int, int, const char *, FH_KEY_TYPE, int, HASH_FUNC, CMP_FUNC)
 
int fh_put (FH_TABLE *ht, FH_KEY key, FH_DATA data)
 
int fh_get (FH_TABLE *ht, FH_KEY key, FH_DATA *data)
 
void fh_destroy (FH_TABLE *ht)
 
void fh_dump (FH_TABLE *ht)
 

Macro Definition Documentation

#define fh_intk_data   fh_key_data.fh_intkey.data

Definition at line 54 of file file_hash.h.

Referenced by fh_create().

#define fh_intk_key   fh_key_data.fh_intkey.key

Definition at line 53 of file file_hash.h.

#define fh_oidk_data   fh_key_data.fh_oidkey.data

Definition at line 52 of file file_hash.h.

Referenced by fh_create().

#define fh_oidk_key   fh_key_data.fh_oidkey.key

Definition at line 51 of file file_hash.h.

#define INVALID_FILE_POS   (FH_FILE_POS)~0

Definition at line 57 of file file_hash.h.

Referenced by fh_create(), fh_get(), fh_put(), and fh_read_page().

Typedef Documentation

typedef int(* CMP_FUNC) (const void *key1, const void *key2)

Definition at line 78 of file file_hash.h.

typedef void* FH_DATA

Definition at line 113 of file file_hash.h.

typedef struct fh_entry FH_ENTRY
typedef struct fh_entry* FH_ENTRY_PTR

Definition at line 66 of file file_hash.h.

typedef unsigned int FH_FILE_POS

Definition at line 56 of file file_hash.h.

typedef struct fh_info FH_INFO
typedef void* FH_KEY

Definition at line 112 of file file_hash.h.

typedef struct fh_page_hdr FH_PAGE_HDR
typedef struct fh_table FH_TABLE
typedef unsigned int(* HASH_FUNC) (const void *info, unsigned int htsize)

Definition at line 77 of file file_hash.h.

Enumeration Type Documentation

Enumerator
FH_OID_KEY 
FH_INT_KEY 

Definition at line 80 of file file_hash.h.

Function Documentation

void fh_destroy ( FH_TABLE ht)

Definition at line 310 of file file_hash.c.

References fh_table::bitmap, fh_table::fd, fh_page_hdr::fh_entries, free_and_init, fh_table::hash_filename, fh_page_hdr::next, fh_table::pg_hdr, and fh_table::pg_hdr_alloc.

Referenced by extractobjects_cleanup(), and fh_create().

Here is the caller graph for this function: