UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DbName.H
1 /* DbName.H */
2 /* $Id: DbName.H,v 1.5 2007/02/21 11:21:08 vlad Exp $ */
3 #ifndef __DbName_H
4 #define __DbName_H
5 
6 #include <ldb/dbnamedefs.h>
7 
8 
14 class DbName : private dbNameStruct
15 {
16 public:
17 
19  DbName ();
20 
22  DbName (const dbNameStruct& dbns);
23 
26  DbName (const char* szFileName);
27 
29  const char* symbolic_name () const;
30 
32  const dbNameStruct& struct_name () const;
33 
34  /* Change this name from external source. */
35  DbName& operator= (const dbNameStruct& dbns);
36  DbName& operator= (const DbName& dbn);
37  DbName& operator= (const char* szFileName);
38 
39  /* Set parts of structured name. */
40  void set_table (const char* szTableType);
41  void set_well (const char* szWellName);
42  void set_sp (int nSP);
43  void set_mod (int nMod);
44  void set_list_flag (Logic bList);
45 
46  /* Unset parts of structured name. */
47  void unset_table ();
48  void unset_well ();
49  void unset_sp ();
50  void unset_mod ();
51 
52  /* Get parts of structured name or returns NULL or -1 if the part is
53  not defined. */
54  const char* get_table () const;
55  const char* get_well () const;
56  int get_sp () const;
57  int get_mod () const;
58  Logic get_list_flag () const;
59 
60 
62  virtual Logic is_empty () const;
63 
64 protected:
65 
67  virtual void rebuild_fname ();
68 
69 private:
70 
72  char dbfname[DB_FILE_NAME_LEN+1];
73 
74 };
75 
76 
77 #endif /* DbName.H */
virtual Logic is_empty() const
Definition: DbName.H:14
const char * symbolic_name() const
Definition: dbnamedefs.h:67
virtual void rebuild_fname()
const dbNameStruct & struct_name() const