1 |
picher |
199 |
//* [ FreSOP - base ] ********************************************* gn_com.h * >
|
2 |
|
|
//
|
3 |
|
|
// ver.: 20090114
|
4 |
|
|
|
5 |
|
|
#ifndef _gn_comh
|
6 |
|
|
#define _gn_comh
|
7 |
|
|
|
8 |
|
|
#include <stdio.h>
|
9 |
|
|
|
10 |
|
|
#include "bib_0000.h"
|
11 |
|
|
#include "bib_m012.h"
|
12 |
|
|
#include "maz.h"
|
13 |
|
|
|
14 |
|
|
#define co_lcc_max_nom_gn 9
|
15 |
|
|
|
16 |
|
|
//------------------------------------------------------------------------------
|
17 |
|
|
//-- référence rapide des méthodes publiques pour la classe o_gn_com
|
18 |
|
|
//--
|
19 |
|
|
//-- o_gm_com ( )
|
20 |
|
|
//-- ~o_gm_com ( )
|
21 |
|
|
//-- def_prms ( ... )
|
22 |
|
|
//-- ren_nbr_elements ( ... )
|
23 |
|
|
//-- ren_nom ( ... )
|
24 |
|
|
//-- ren_vno_elements ( ... )
|
25 |
|
|
//-- affiche_bio ( )
|
26 |
|
|
|
27 |
|
|
class o_gn_com {
|
28 |
|
|
|
29 |
|
|
//============================================================================
|
30 |
|
|
//=============================== ATTRIBUTS ==================================
|
31 |
|
|
//============================================================================
|
32 |
|
|
|
33 |
|
|
ulong nbr_noeuds ;
|
34 |
|
|
|
35 |
|
|
char nom[co_lcc_max_nom_gn] ;
|
36 |
|
|
|
37 |
|
|
ulong *vno_noeuds ; // vecteur contenant les numéros des noeuds formant le groupe de noeuds
|
38 |
|
|
|
39 |
|
|
//============================================================================
|
40 |
|
|
//=========================== MÉTHODES PRIVÉES ===============================
|
41 |
|
|
//============================================================================
|
42 |
|
|
|
43 |
|
|
//============================================================================
|
44 |
|
|
//== initialisation de la classe
|
45 |
|
|
|
46 |
|
|
ty_RSLT initialisation ( void );
|
47 |
|
|
|
48 |
|
|
//============================================================================
|
49 |
|
|
//== gestion de mémoire
|
50 |
|
|
|
51 |
|
|
ty_RSLT alloc_vno_noeuds ( void );
|
52 |
|
|
|
53 |
|
|
ty_RSLT desalloc_tout ( void );
|
54 |
|
|
|
55 |
|
|
ty_RSLT desalloc_vno_noeuds ( void );
|
56 |
|
|
|
57 |
|
|
public:
|
58 |
|
|
|
59 |
|
|
//============================================================================
|
60 |
|
|
//========================== MÉTHODES PUBLIQUES ==============================
|
61 |
|
|
//============================================================================
|
62 |
|
|
|
63 |
|
|
o_gn_com ( void );
|
64 |
|
|
|
65 |
|
|
~o_gn_com ( void );
|
66 |
|
|
|
67 |
|
|
//============================================================================
|
68 |
|
|
//== définition des paramètres de la classe
|
69 |
|
|
|
70 |
|
|
ty_RSLT def_prms ( char *_nom ,
|
71 |
|
|
ulong _nbr_noeuds ,
|
72 |
|
|
ulong *_vno_noeuds );
|
73 |
|
|
|
74 |
|
|
//============================================================================
|
75 |
|
|
//== accesseurs et mutateurs
|
76 |
|
|
|
77 |
|
|
ty_RSLT ren_nbr_noeuds ( ulong *_nbr_noeuds );
|
78 |
|
|
|
79 |
|
|
ty_RSLT ren_nom ( char *_nom );
|
80 |
|
|
|
81 |
|
|
ty_RSLT ren_vno_noeuds ( ulong **_vno_noeuds );
|
82 |
|
|
|
83 |
|
|
//============================================================================
|
84 |
|
|
//== autres méthodes
|
85 |
|
|
|
86 |
|
|
//-- affiche les infos sur la classe -----------------------------------------
|
87 |
|
|
|
88 |
|
|
ty_RSLT affiche_bio ( void );
|
89 |
|
|
|
90 |
|
|
};
|
91 |
|
|
|
92 |
|
|
typedef o_gn_com *ptr_o_gn_com;
|
93 |
|
|
|
94 |
|
|
//******************************************************************************
|
95 |
|
|
// initialisation de gn_com h
|
96 |
|
|
|
97 |
|
|
ty_RSLT init_gn_com( void );
|
98 |
|
|
|
99 |
|
|
//******************************************************************************
|
100 |
|
|
// finitialisation de gn_com h
|
101 |
|
|
|
102 |
|
|
ty_RSLT finit_gn_com( void );
|
103 |
|
|
|
104 |
|
|
#endif
|
105 |
|
|
|
106 |
|
|
//* [ FreSOP - base ] ********************************************* gn_com.h * <
|