1 |
|
5 |
|
2 |
|
|
#ifndef sl_solutionH
|
3 |
|
|
#define sl_solutionH
|
4 |
|
|
|
5 |
|
|
#include <stdio.h>
|
6 |
|
|
#include "sl_solution.h"
|
7 |
|
|
#include <ostream.h>
|
8 |
|
|
|
9 |
|
|
#ifdef WINDOWS_VERSION
|
10 |
|
|
#ifdef BUILT_DLL_SOLVEUR
|
11 |
|
|
#define DLLPORTSOLVEUR __declspec(dllexport)
|
12 |
|
|
#else
|
13 |
|
|
#define DLLPORTSOLVEUR __declspec(dllimport)
|
14 |
|
|
#endif
|
15 |
|
|
#else
|
16 |
|
|
#define DLLPORTSOLVEUR
|
17 |
|
|
#endif
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
DLLPORTSOLVEUR std::ostream& operator << (std::ostream& o,class SL_SOLUTION& sol);
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
class DLLPORTSOLVEUR SL_SOLUTION
|
27 |
|
|
{
|
28 |
|
|
public:
|
29 |
|
|
SL_SOLUTION(int nb,char* chemin,int code);
|
30 |
|
|
virtual ~SL_SOLUTION();
|
31 |
|
|
|
32 |
|
|
double lire(int i,int j);
|
33 |
|
|
void ecrire(int i,int j,double val);
|
34 |
|
|
int get_nb_champ(void);
|
35 |
|
|
void enregistrer(std::ostream& o);
|
36 |
|
|
|
37 |
|
|
void efface(void);
|
38 |
|
|
|
39 |
|
|
friend std::ostream& operator << (std::ostream& o,SL_SOLUTION& sol);
|
40 |
|
|
|
41 |
|
|
private:
|
42 |
|
|
char *nom_fichier;
|
43 |
|
|
int nb_champs;
|
44 |
|
|
FILE* in;
|
45 |
|
|
};
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
#endif
|
50 |
|
|
|
51 |
|
|
|