00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 #ifndef __FK_DATA_ACCESS_HEADER__
00073 #define __FK_DATA_ACCESS_HEADER__
00074
00075 #include <FK/Reference.h>
00076
00077 class fk_DataBase;
00078
00080
00087 class fk_DataAccess : public fk_ReferenceL3 {
00088
00089 friend class fk_Solid;
00090
00091 private:
00092 fk_DataBase *ope_DB;
00093
00094 protected:
00095
00096 #ifndef FK_DOXYGEN_USER_PROCESS
00097
00098 fk_DataBase * GetDB(void);
00099 void SetDataBase(fk_DataBase *);
00100
00101 fk_Vertex * GetNewVertexObj_(void);
00102 fk_Vertex * GetNewVertexObj_(int);
00103 fk_Half * GetNewHalfObj_(void);
00104 fk_Half * GetNewHalfObj_(int);
00105 fk_Edge * GetNewEdgeObj_(void);
00106 fk_Edge * GetNewEdgeObj_(int);
00107 fk_Loop * GetNewLoopObj_(void);
00108 fk_Loop * GetNewLoopObj_(int);
00109
00110 bool DeleteVertexObj_(fk_Vertex *);
00111 bool DeleteHalfObj_(fk_Half *);
00112 bool DeleteEdgeObj_(fk_Edge *);
00113 bool DeleteLoopObj_(fk_Loop *);
00114
00115 void AllDBClear_(void);
00116
00117 #endif
00118
00119 public:
00121 fk_DataAccess(void);
00122
00124 ~fk_DataAccess();
00125
00127
00133 bool checkDB(void) const;
00134
00136
00141 bool checkTopology(void);
00142
00144
00148 void printTopology(void);
00149
00151
00152
00154
00161 bool existVertex(fk_Vertex *vertex) const;
00162
00164
00171 bool existVertex(int ID) const;
00172
00174
00181 bool existHalf(fk_Half *half) const;
00182
00184
00191 bool existHalf(int ID) const;
00192
00194
00201 bool existEdge(fk_Edge *edge) const;
00202
00204
00211 bool existEdge(int ID) const;
00212
00214
00221 bool existLoop(fk_Loop *loop) const;
00222
00224
00231 bool existLoop(int ID) const;
00232
00233
00235
00236
00238
00246 fk_Vertex * getVData(int ID) const;
00247
00249
00257 fk_Half * getHData(int ID) const;
00258
00260
00268 fk_Edge * getEData(int ID) const;
00269
00271
00279 fk_Loop * getLData(int ID) const;
00280
00282
00298 fk_Vertex * getNextV(fk_Vertex *vertex) const;
00299
00301
00317 fk_Half * getNextH(fk_Half *half) const;
00318
00320
00336 fk_Edge * getNextE(fk_Edge *edge) const;
00337
00339
00355 fk_Loop * getNextL(fk_Loop *loop) const;
00356
00358
00366 fk_Vertex * getLastV(void) const;
00367
00369
00377 fk_Half * getLastH(void) const;
00378
00380
00388 fk_Edge * getLastE(void) const;
00389
00391
00399 fk_Loop * getLastL(void) const;
00400
00401
00403
00405
00410 int getVNum(void) const;
00411
00413
00419 int getHNum(void) const;
00420
00422
00427 int getENum(void) const;
00428
00430
00435 int getLNum(void) const;
00436
00437 };
00438
00439
00440 #endif // !__FK_DATA_ACCESS_HEADER__