1 |
//####//------------------------------------------------------------ |
2 |
//####//------------------------------------------------------------ |
3 |
//####// MAGiC |
4 |
//####// Jean Christophe Cuilliere et Vincent FRANCOIS |
5 |
//####// Departement de Genie Mecanique - UQTR |
6 |
//####//------------------------------------------------------------ |
7 |
//####// MAGIC est un projet de recherche de l equipe ERICCA |
8 |
//####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres |
9 |
//####// http://www.uqtr.ca/ericca |
10 |
//####// http://www.uqtr.ca/ |
11 |
//####//------------------------------------------------------------ |
12 |
//####//------------------------------------------------------------ |
13 |
//####// |
14 |
//####// ot_parametres.h |
15 |
//####// |
16 |
//####//------------------------------------------------------------ |
17 |
//####//------------------------------------------------------------ |
18 |
//####// COPYRIGHT 2000-2024 |
19 |
//####// jeu 13 jun 2024 11:53:59 EDT |
20 |
//####//------------------------------------------------------------ |
21 |
//####//------------------------------------------------------------ |
22 |
#ifndef ot_parametresH |
23 |
#define ot_parametresH |
24 |
|
25 |
|
26 |
|
27 |
|
28 |
#include <vector> |
29 |
#include <string> |
30 |
|
31 |
class OT_PARAMETRES |
32 |
{ |
33 |
public: |
34 |
OT_PARAMETRES(); |
35 |
OT_PARAMETRES(OT_PARAMETRES &mdd); |
36 |
~OT_PARAMETRES(); |
37 |
|
38 |
enum type {DOUBLE=1,STRING=2}; |
39 |
void ajouter(std::string chaine,double valeur,int typep,std::string aide=""); |
40 |
void ajouter(std::string chaine,std::string valeurstring,int typep,std::string aide=""); |
41 |
void ajouter(std::string chaine,std::vector<double> &valeur,int typep,std::string aide); |
42 |
void ajouter(std::string chaine); |
43 |
void change_valeur(std::string chaine,double val,int num=0); |
44 |
void change_valeur(std::string chaine,std::string val); |
45 |
double get_valeur(std::string chaine,int num=0); |
46 |
int get_type(std::string chaine); |
47 |
std::string get_nom(std::string chaine); |
48 |
int get_num_param(std::string chaine); |
49 |
void enregistrer(char *nom); |
50 |
int lire(char *nom); |
51 |
void vide(void); |
52 |
int get_nb(void); |
53 |
double get_valeur(int num); |
54 |
std::string get_nom(int num); |
55 |
int get_type(int num); |
56 |
|
57 |
private: |
58 |
std::vector<std::string> nom_param; |
59 |
std::vector<std::string> valeur_param; |
60 |
std::vector<std::string> aide_param; |
61 |
std::vector<std::string> params; |
62 |
std::vector<int> type_param; |
63 |
|
64 |
}; |
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
#endif |