1 |
francois |
283 |
//------------------------------------------------------------ |
2 |
|
|
//------------------------------------------------------------ |
3 |
|
|
// MAGiC |
4 |
|
|
// Jean Christophe Cuilli�re et Vincent FRANCOIS |
5 |
|
|
// D�partement de G�nie M�canique - UQTR |
6 |
|
|
//------------------------------------------------------------ |
7 |
|
|
// Le projet MAGIC est un projet de recherche du d�partement |
8 |
|
|
// de g�nie m�canique de l'Universit� du Qu�bec � |
9 |
|
|
// Trois Rivi�res |
10 |
|
|
// Les librairies ne peuvent �tre utilis�es sans l'accord |
11 |
|
|
// des auteurs (contact : francois@uqtr.ca) |
12 |
|
|
//------------------------------------------------------------ |
13 |
|
|
//------------------------------------------------------------ |
14 |
|
|
// |
15 |
|
|
// mg_gestionnaire.h |
16 |
|
|
// |
17 |
|
|
//------------------------------------------------------------ |
18 |
|
|
//------------------------------------------------------------ |
19 |
|
|
// COPYRIGHT 2000 |
20 |
|
|
// Version du 02/03/2006 � 11H22 |
21 |
|
|
//------------------------------------------------------------ |
22 |
|
|
//------------------------------------------------------------ |
23 |
|
|
#ifndef __MGGESTIONNAIRE_ |
24 |
|
|
#define __MGGESTIONNAIRE_ |
25 |
|
|
|
26 |
|
|
#ifdef WINDOWS_VERSION |
27 |
|
|
#ifdef BUILT_DLL_GEOMETRIE |
28 |
|
|
#define DLLPORTGEOMETRIE __declspec(dllexport) |
29 |
|
|
#else |
30 |
|
|
#define DLLPORTGEOMETRIE __declspec(dllimport) |
31 |
|
|
#endif |
32 |
|
|
#else |
33 |
|
|
#define DLLPORTGEOMETRIE |
34 |
|
|
#endif |
35 |
|
|
|
36 |
|
|
|
37 |
|
|
#ifdef BORLANDCPP |
38 |
|
|
#include <map.h> |
39 |
|
|
#include <set.h> |
40 |
|
|
#else |
41 |
|
|
#include <map> |
42 |
|
|
#include <set> |
43 |
|
|
#endif |
44 |
|
|
|
45 |
francois |
375 |
#include "mg_definition.h" |
46 |
francois |
283 |
#include "mg_identificateur.h" |
47 |
|
|
#include "mg_geometrie.h" |
48 |
|
|
#include "mg_maillage.h" |
49 |
francois |
686 |
#include "mg_arbre.h" |
50 |
francois |
283 |
#include "fem_maillage.h" |
51 |
|
|
#include "mg_solution.h" |
52 |
|
|
#include "fem_solution.h" |
53 |
|
|
|
54 |
|
|
#ifdef BREP_SAT |
55 |
|
|
#include "sat_gestionnaire.h" |
56 |
|
|
#endif |
57 |
|
|
#ifdef BREP_STEP |
58 |
|
|
#include "st_gestionnaire.h" |
59 |
|
|
#endif |
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
typedef std::set<MG_IDENTIFICATEUR*,inf<MG_IDENTIFICATEUR*> > LISTE_ENTITE; |
66 |
|
|
typedef std::map<unsigned long,MG_GEOMETRIE*,std::less<unsigned long> > LISTE_MG_GEOMETRIE; |
67 |
|
|
typedef std::map<unsigned long,MG_MAILLAGE*,std::less<unsigned long> > LISTE_MG_MAILLAGE; |
68 |
|
|
typedef std::map<unsigned long,FEM_MAILLAGE*,std::less<unsigned long> > LISTE_FEM_MAILLAGE; |
69 |
|
|
typedef std::map<unsigned long,MG_SOLUTION*,std::less<unsigned long> > LISTE_MG_SOLUTION; |
70 |
|
|
typedef std::map<unsigned long,FEM_SOLUTION*,std::less<unsigned long> > LISTE_FEM_SOLUTION; |
71 |
francois |
686 |
typedef std::map<unsigned long,MG_ARBRE*,std::less<unsigned long> > LISTE_MG_ARBRE; |
72 |
francois |
283 |
|
73 |
|
|
DLLPORTGEOMETRIE std::ostream& operator << (std::ostream& o,class MG_GESTIONNAIRE& gest); |
74 |
|
|
|
75 |
|
|
|
76 |
|
|
class DLLPORTGEOMETRIE MG_GESTIONNAIRE |
77 |
|
|
{ |
78 |
|
|
public: |
79 |
|
|
MG_GESTIONNAIRE(); |
80 |
|
|
virtual ~MG_GESTIONNAIRE(); |
81 |
|
|
|
82 |
francois |
686 |
int ajouter_mg_arbre(MG_ARBRE *mgarbre); |
83 |
|
|
MG_ARBRE* get_mg_arbreid(unsigned long num); |
84 |
|
|
MG_ARBRE* get_mg_arbre(unsigned int num); |
85 |
|
|
MG_ARBRE* get_premier_arbre(LISTE_MG_ARBRE::iterator &it); |
86 |
|
|
MG_ARBRE* get_suivant_arbre(LISTE_MG_ARBRE::iterator &it); |
87 |
|
|
unsigned int get_nb_mg_arbre(void); |
88 |
|
|
int supprimer_mg_arbreid(unsigned long num); |
89 |
|
|
int supprimer_mg_arbre(unsigned int num); |
90 |
|
|
void supprimer_tout_mg_arbre(void); |
91 |
|
|
|
92 |
|
|
|
93 |
francois |
283 |
int ajouter_mg_geometrie(MG_GEOMETRIE *mggeo); |
94 |
|
|
MG_GEOMETRIE* get_mg_geometrieid(unsigned long num); |
95 |
|
|
MG_GEOMETRIE* get_mg_geometrie(unsigned int num); |
96 |
|
|
MG_GEOMETRIE* get_premier_geometrie(LISTE_MG_GEOMETRIE::iterator &it); |
97 |
|
|
MG_GEOMETRIE* get_suivant_geometrie(LISTE_MG_GEOMETRIE::iterator &it); |
98 |
|
|
unsigned int get_nb_mg_geometrie(void); |
99 |
|
|
int supprimer_mg_geometrieid(unsigned long num); |
100 |
|
|
int supprimer_mg_geometrie(unsigned int num); |
101 |
|
|
void supprimer_tout_mg_geometrie(void); |
102 |
|
|
|
103 |
|
|
int ajouter_mg_maillage(MG_MAILLAGE *mgmai); |
104 |
|
|
MG_MAILLAGE* get_mg_maillageid(unsigned long num); |
105 |
|
|
MG_MAILLAGE* get_mg_maillage(unsigned int num); |
106 |
|
|
MG_MAILLAGE* get_premier_mg_maillage(LISTE_MG_MAILLAGE::iterator &it); |
107 |
|
|
MG_MAILLAGE* get_suivant_mg_maillage(LISTE_MG_MAILLAGE::iterator &it); |
108 |
|
|
unsigned int get_nb_mg_maillage(void); |
109 |
|
|
int supprimer_mg_maillageid(unsigned long num); |
110 |
|
|
int supprimer_mg_maillage(unsigned int num); |
111 |
|
|
void supprimer_tout_mg_maillage(void); |
112 |
|
|
|
113 |
|
|
int ajouter_fem_maillage(FEM_MAILLAGE *femmai); |
114 |
|
|
FEM_MAILLAGE* get_fem_maillageid(unsigned long num); |
115 |
|
|
FEM_MAILLAGE* get_fem_maillage(unsigned int num); |
116 |
|
|
FEM_MAILLAGE* get_premier_fem_maillage(LISTE_FEM_MAILLAGE::iterator &it); |
117 |
|
|
FEM_MAILLAGE* get_suivant_fem_maillage(LISTE_FEM_MAILLAGE::iterator &it); |
118 |
|
|
unsigned int get_nb_fem_maillage(void); |
119 |
|
|
int supprimer_fem_maillageid(unsigned long num); |
120 |
|
|
int supprimer_fem_maillage(unsigned int num); |
121 |
|
|
void supprimer_tout_fem_maillage(void); |
122 |
|
|
|
123 |
|
|
|
124 |
|
|
int ajouter_mg_solution(MG_SOLUTION *mgsol); |
125 |
|
|
MG_SOLUTION* get_mg_solutionid(unsigned long num); |
126 |
|
|
MG_SOLUTION* get_mg_solution(unsigned int num); |
127 |
francois |
326 |
MG_SOLUTION* get_mg_solution(MG_MAILLAGE* mg,int nb_champs,char *nomfichier,char *nomsolution); |
128 |
francois |
283 |
MG_SOLUTION* get_premier_mg_solution(LISTE_MG_SOLUTION::iterator &it); |
129 |
|
|
MG_SOLUTION* get_suivant_mg_solution(LISTE_MG_SOLUTION::iterator &it) ; |
130 |
|
|
unsigned int get_nb_mg_solution(void); |
131 |
|
|
int supprimer_mg_solutionid(unsigned long num); |
132 |
|
|
int supprimer_mg_solution(unsigned int num); |
133 |
|
|
void supprimer_tout_mg_solution(void); |
134 |
|
|
|
135 |
|
|
|
136 |
|
|
int ajouter_fem_solution(FEM_SOLUTION *mgsol); |
137 |
|
|
FEM_SOLUTION* get_fem_solutionid(unsigned long num); |
138 |
|
|
FEM_SOLUTION* get_fem_solution(unsigned int num); |
139 |
francois |
326 |
FEM_SOLUTION* get_fem_solution(FEM_MAILLAGE* fem,int nb_champs,char *nomfichier,char *nomsolution); |
140 |
francois |
283 |
FEM_SOLUTION* get_premier_fem_solution(LISTE_FEM_SOLUTION::iterator &it); |
141 |
|
|
FEM_SOLUTION* get_suivant_fem_solution(LISTE_FEM_SOLUTION::iterator &it) ; |
142 |
|
|
unsigned int get_nb_fem_solution(void); |
143 |
|
|
int supprimer_fem_solutionid(unsigned long num); |
144 |
|
|
int supprimer_fem_solution(unsigned int num); |
145 |
|
|
int supprimer_fem_solution_du_gestionnaire(unsigned int num); |
146 |
|
|
void supprimer_tout_fem_solution(void); |
147 |
|
|
|
148 |
|
|
#ifdef BREP_SAT |
149 |
|
|
class SAT_GESTIONNAIRE& get_gest_sat(void); |
150 |
|
|
#endif |
151 |
|
|
#ifdef BREP_STEP |
152 |
|
|
class ST_GESTIONNAIRE& get_gest_step(void); |
153 |
|
|
#endif |
154 |
|
|
#ifdef BREP_SLD |
155 |
|
|
class SLD_FONCTION& get_sld_fonction(void); |
156 |
|
|
#endif |
157 |
|
|
|
158 |
|
|
|
159 |
|
|
#ifdef BREP_OCC |
160 |
|
|
class OCC_FONCTION1& get_occ_fonction1(void); |
161 |
|
|
#endif |
162 |
|
|
|
163 |
|
|
|
164 |
|
|
void recherche_bonid(MG_IDENTIFICATEUR &ident); |
165 |
|
|
void recherche_bonidvisuel(MG_IDENTIFICATEUR &ident); |
166 |
|
|
|
167 |
|
|
virtual void enregistrer(std::ostream& o); |
168 |
|
|
virtual void enregistrer(char* chemin); |
169 |
|
|
virtual void enregistrer(const char* chemin); |
170 |
|
|
|
171 |
|
|
|
172 |
|
|
friend std::ostream& operator << (std::ostream& o,MG_GESTIONNAIRE& gest); |
173 |
|
|
protected: |
174 |
|
|
LISTE_ENTITE lst_entite; |
175 |
|
|
LISTE_MG_GEOMETRIE lst_mg_geometrie; |
176 |
|
|
LISTE_MG_MAILLAGE lst_mg_maillage; |
177 |
|
|
LISTE_FEM_MAILLAGE lst_fem_maillage; |
178 |
|
|
LISTE_MG_SOLUTION lst_mg_solution; |
179 |
|
|
LISTE_FEM_SOLUTION lst_fem_solution; |
180 |
francois |
686 |
LISTE_MG_ARBRE lst_mg_arbre; |
181 |
francois |
283 |
|
182 |
|
|
unsigned long entiteidmax; |
183 |
|
|
unsigned long entitevisuelidmax; |
184 |
|
|
int ouvertsld; |
185 |
|
|
#ifdef BREP_SAT |
186 |
|
|
SAT_GESTIONNAIRE fichsat; |
187 |
|
|
#endif |
188 |
|
|
#ifdef BREP_STEP |
189 |
|
|
ST_GESTIONNAIRE fichstep; |
190 |
|
|
#endif |
191 |
|
|
#ifdef BREP_SLD |
192 |
|
|
SLD_FONCTION* fonction; |
193 |
|
|
#endif |
194 |
|
|
|
195 |
|
|
#ifdef BREP_OCC |
196 |
|
|
OCC_FONCTION1* fonction1; |
197 |
|
|
#endif |
198 |
|
|
}; |
199 |
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
#endif |
203 |
|
|
|
204 |
|
|
|