UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | List of all members
DbLockTable Class Reference

#include <DbLockTable.H>

Inheritance diagram for DbLockTable:
DbLTName FileLock DbTable DbName Lock dbNameStruct

Public Member Functions

 DbLockTable (const char *project, const dbNameStruct &dbns)
 
 DbLockTable (const char *project, const char *szDbFileName)
 
virtual ~DbLockTable ()
 
ErrCode add_lock (LockId &glid, DbAccess dbac)
 
ErrCode delete_lock (LockId glid)
 
DbIndex find_lock (LockId glid)
 
DbIndex find_lock ()
 
- Public Member Functions inherited from DbLTName
 DbLTName (const dbNameStruct &dbns)
 
 DbLTName (const char *szFileName)
 
const char * exclock_fname () const
 
const char * shalock_fname () const
 
const char * exclock_fpath (const char *project=NULL)
 
const char * shalock_fpath (const char *project=NULL)
 
- Public Member Functions inherited from DbName
 DbName ()
 
 DbName (const dbNameStruct &dbns)
 
 DbName (const char *szFileName)
 
const char * symbolic_name () const
 
const dbNameStructstruct_name () const
 
DbNameoperator= (const dbNameStruct &dbns)
 
DbNameoperator= (const DbName &dbn)
 
DbNameoperator= (const char *szFileName)
 
void set_table (const char *szTableType)
 
void set_well (const char *szWellName)
 
void set_sp (int nSP)
 
void set_mod (int nMod)
 
void set_list_flag (Logic bList)
 
void unset_table ()
 
void unset_well ()
 
void unset_sp ()
 
void unset_mod ()
 
const char * get_table () const
 
const char * get_well () const
 
int get_sp () const
 
int get_mod () const
 
Logic get_list_flag () const
 
virtual Logic is_empty () const
 
- Public Member Functions inherited from FileLock
 FileLock (const char *path)
 
virtual ~FileLock ()
 
- Public Member Functions inherited from Lock
 Lock ()
 
virtual ~Lock ()
 
LockId lock_id () const
 
- Public Member Functions inherited from DbTable
 DbTable (const DbTTDesc &dbtt, DbIndex quant=DB_QUANT, DbIndex start_volume=DB_START_VOLUME)
 
 DbTable (DbTable &dbt)
 
virtual ~DbTable ()
 
const DbTTDesctable_format () const
 
virtual DbIndex lines_count () const
 
virtual DbIndex lines_range (DbIndex line1, DbIndex line2, DbIndex *line=NULL) const
 
virtual void get_value (const char *column, DbIndex line, void *ptr)
 
virtual void get_values (const char *column, DbIndex start_line, DbIndex lines_cnt, void *ptr)
 
virtual Logic check_empty_value (const char *column, DbIndex line)
 
virtual UnitId get_unit (const char *column) const
 
virtual const DmnDescAr & get_domains ()
 
virtual DbDomainDesc get_domain (const char *column) const
 
virtual Compar compare_lines (const char *column, DbIndex line1, DbIndex line2)
 
const char * tt_name () const
 
Logic is_modified () const
 
Logic is_modifiable () const
 
virtual void clean ()
 
virtual void set_value (const char *column, DbIndex line, const void *ptr)
 
virtual void set_values (const char *column, DbIndex start_line, DbIndex lines_cnt, const void *ptr)
 
virtual void set_empty_value (const char *column, DbIndex line)
 
virtual void set_unit (const char *column, UnitId unid)
 
virtual void insert_line (DbIndex line, DbIndex lines_cnt=1, Logic bInit=TRUE)
 
virtual void remove_lines (DbIndex line1, DbIndex line2)
 
virtual void exchange_lines (DbIndex line1, DbIndex line2)
 
virtual void merge (DbTable &src)
 
virtual void copy_lines (DbIndex iWhere, DbTable &src, DbIndex iFrom, DbIndex nLines)
 
virtual void modify ()
 
virtual void not_modified ()
 
virtual void set_modifiability (Logic bFlag)
 
void read_leader (int fd, ByteOrder &eBO, DbIndex &nLineCnt, unsigned &nDmnsCnt)
 
void append_table (int fd, ByteOrder eBO, DbIndex nLineCnt)
 
void read (int fd)
 
void write_leader (int fd, ByteOrder eBO, DbIndex nLineCnt)
 
void record_table (int fd, ByteOrder eBO, DbIndex iStartLine, DbIndex nLineCnt)
 
void write (int fd)
 
void set_preread_size (size_t nSize)
 
size_t get_preread_size () const
 
void write_changed ()
 
void load_all_lines ()
 
MutexId * mutex () const
 

Static Public Member Functions

static const char * dbac2symb (DbAccess dbac)
 
static DbAccess symb2dbac (const char *s)
 

Additional Inherited Members

- Protected Member Functions inherited from DbLTName
virtual void rebuild_fname ()
 
- Protected Member Functions inherited from Lock
void lock ()
 
void unlock ()
 
- Protected Member Functions inherited from DbTable
virtual void read_lines (DbIndex line1, DbIndex line2)
 
virtual void write_lines (DbIndex line1, DbIndex line2)
 
virtual void read_line_seq (DbIndex line1, DbIndex line2)
 
virtual void write_line_seq (DbIndex line1, DbIndex line2)
 
virtual void load_lines (DbIndex line1, DbIndex line2)
 
virtual void change_lines (DbIndex line1, DbIndex line2)
 
unsigned n2i (const char *column) const
 
virtual unsigned valid_n2i (const char *column) const
 
void * i2ptr (unsigned dmn_i, DbIndex line) const
 
size_t i2size (unsigned dmn_i) const
 
- Protected Attributes inherited from DbTable
DbTTDesc fmt
 
DbBufStorage dtable
 
DbFileDomainAttrdmn_attrs
 
unsigned nFileDmnsCnt
 
- Static Protected Attributes inherited from Lock
static LocksAr * plocksar
 

Detailed Description

Object for access to lock's information table.

Constructor & Destructor Documentation

DbLockTable::DbLockTable ( const char *  project,
const dbNameStruct dbns 
)

Make exclusive lock on the access of lock's information table and load it in memory

virtual DbLockTable::~DbLockTable ( )
virtual

Save lock's information table and delete lock from it

Member Function Documentation

ErrCode DbLockTable::add_lock ( LockId &  glid,
DbAccess  dbac 
)

Add new lock record

static const char* DbLockTable::dbac2symb ( DbAccess  dbac)
static

Convert DbAccess to string; if dbac=DbMemory then NULL will be returned.

ErrCode DbLockTable::delete_lock ( LockId  glid)

Delete pointed lock record

DbIndex DbLockTable::find_lock ( LockId  glid)

Find lock record by its id or return DB_LOCK_UNKNOWN_ID if failed

DbIndex DbLockTable::find_lock ( )

Find lock record by additional information, stored in lock table, or return DB_LOCK_UNKNOWN_ID if failed

static DbAccess DbLockTable::symb2dbac ( const char *  s)
static

Convert string to DbAccess; if unknown - DbMemory is returned


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