1 |
francois |
1158 |
//####//------------------------------------------------------------ |
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 |
|
|
//####// mc_propriete.cpp |
15 |
|
|
//####// |
16 |
|
|
//####//------------------------------------------------------------ |
17 |
|
|
//####//------------------------------------------------------------ |
18 |
|
|
//####// COPYRIGHT 2000-2024 |
19 |
|
|
//####// jeu 13 jun 2024 17:15:00 EDT |
20 |
|
|
//####//------------------------------------------------------------ |
21 |
|
|
//####//------------------------------------------------------------ |
22 |
francois |
283 |
|
23 |
|
|
|
24 |
|
|
#include "gestionversion.h" |
25 |
|
|
|
26 |
|
|
#pragma hdrstop |
27 |
|
|
|
28 |
francois |
296 |
#include "mc_propriete.h" |
29 |
francois |
283 |
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
francois |
296 |
MC_PROPRIETE::MC_PROPRIETE(char* valeur) |
35 |
francois |
283 |
{ |
36 |
|
|
nom=valeur; |
37 |
|
|
} |
38 |
|
|
|
39 |
francois |
296 |
MC_PROPRIETE::~MC_PROPRIETE() |
40 |
francois |
283 |
{ |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
francois |
296 |
void MC_PROPRIETE::change_valeur(int num,double val) |
46 |
francois |
283 |
{ |
47 |
|
|
if (num>2) return; |
48 |
|
|
if (num<0) return; |
49 |
|
|
valeur[num]=val; |
50 |
|
|
} |
51 |
|
|
|
52 |
francois |
296 |
void MC_PROPRIETE::change_unite(int num,char* val) |
53 |
francois |
283 |
{ |
54 |
|
|
if (num>2) return; |
55 |
|
|
if (num<0) return; |
56 |
|
|
unite[num]=val; |
57 |
|
|
} |
58 |
|
|
|
59 |
francois |
296 |
double MC_PROPRIETE::get_valeur(int num) |
60 |
francois |
283 |
{ |
61 |
|
|
if (num>2) return 0.; |
62 |
|
|
if (num<0) return 0.; |
63 |
|
|
return valeur[num]; |
64 |
|
|
} |
65 |
|
|
|
66 |
francois |
296 |
char* MC_PROPRIETE::get_unite(int num) |
67 |
francois |
283 |
{ |
68 |
|
|
if (num>2) return (char*)""; |
69 |
|
|
if (num<0) return (char*)""; |
70 |
|
|
return (char*)unite[num].c_str(); |
71 |
|
|
} |
72 |
|
|
|
73 |
|
|
|
74 |
francois |
296 |
char* MC_PROPRIETE::get_nom(void) |
75 |
francois |
283 |
{ |
76 |
|
|
return (char*)nom.c_str(); |
77 |
|
|
} |
78 |
|
|
|