UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
db_managers.H
1 /* db_managers.H */
2 /* $Id: db_managers.H,v 1.6 2005/07/18 09:18:06 nikita Exp $ */
3 #ifndef __db_managers_H
4 #define __db_managers_H
5 
6 #include <ldb/dbtools.h>
7 #include <mix/General.h>
8 #include <mix/geometry.H>
9 
10 
11 #define DBVM_NONE 0
12 #define DBVM_READ 1
13 #define DBVM_WRITE 2
14 #define PM_CLOSE 0.05
15 
16 class pl_model;
17 
19 protected:
20  dbHandle dbhMod3DList;
21 
22  dbHandle dbhPlains;
23  dbHandle dbhBodies;
24  dbHandle dbhPoligons;
25  dbHandle dbhSegments;
26  dbHandle dbhModGlass; //(nikita 22.04.05)
27 
28  int iID;
29  int iLine;
30  int iStatus;
32  dbNameStruct dbsModGlass; //nikita 24.04.05
33 
34  int iSP;
35  char sWellName[DB_WELL_LEN+1];
36  char sProject[PROJECT_LEN+1];
37 
38  int new_db_structure ();
39  int new_id();
40  void clear_modeling_results();
41 
42  void open_model();
43  void close_model();
44 
45  void init(const char*);
46 
47  void open_a_table (const char* sDBName,dbHandle&dbh,DbAccess sDBStatus);
48  int get_id(int);
49  int get_line(int);
50 
51 public:
52  db_volume_manager(const char* sp, int iID=-1);
53  db_volume_manager(const char* sp, const dbItem&);
55  void prepare_to_read();
56  void prepare_to_write();
57 
58  dbHandle& getPlains();
59  dbHandle& getBodies();
60  dbHandle& getBorders();
61  dbHandle& getSegments();
63  dbHandle& getModelVol();//nikita 25.04.05
65  void setModelBordersTable(dbNameStruct);//nikita 25.04.05
66  void set_list_info (const char* sComment, Logic flag); // ID тут не задается!
67  void set_tables_info (const char* sWell, int iSP);
68 
69  void get_list_info (char* sComment, Logic &flag,int&id);
70  void get_tables_info (char* sWell, int& iSP);
71 
72  void fix_dbStruct(dbNameStruct& dbnsIn)const;
73 };
74 
76 protected:
77  int iID;
78  int iUWK;
79  int iDWK;
80  point pCurr;
81  char sProject[PROJECT_LEN+1];
82  int iLine;
83  Logic lTablesExist;
84  dbHandle dbhHitRays;
85  dbHandle dbhRayPaths; //nikita
86  dbHandle dbhTDLs;
87  dbHandle dbhReceivers;
88  int our_line();
89 public:
90  db_results_manager(int id,const char* sp);
92  dbHandle get_receivers();
93  dbHandle get_hitrays();
94  dbHandle get_raypaths();//nikita
95  void clear_hitrays();
96  void clear_raypaths();//nikita
97  void clear_tdls();
98  dbHandle get_tdls();
99  void prepare_tables(point,int,int,const pl_model*);
100  void set_sp(const point& pSP);
101  void get_shots_data(aPoints& apSPs,IntAr& iaDT,IntAr& iaUT);
102  point sp(){return pCurr;};
103  void delete_modeling_data(const point& pSP);
104  void get_list_item(dbItem& dbiList);
105  void get_wave_kinds(int&ik1,int&ik2);
106 };
107 
108 #endif /* db_managers.H */
Definition: p_model.H:29
Definition: dbnamedefs.h:67
dbHandle & getModelVol()
Definition: db_managers.H:75
Definition: IntAr.H:14
dbNameStruct dbsModGlass
Definition: db_managers.H:32
Definition: db_managers.H:18
Definition: geometry.H:16
void setModelBordersTable(dbNameStruct)
Definition: dbnamedefs.h:85