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 |
|
|
// parse.h |
16 |
|
|
// |
17 |
|
|
//------------------------------------------------------------ |
18 |
|
|
//------------------------------------------------------------ |
19 |
|
|
// COPYRIGHT 2000 |
20 |
|
|
// Version du 02/03/2006 � 11H24 |
21 |
|
|
//------------------------------------------------------------ |
22 |
|
|
//------------------------------------------------------------ |
23 |
|
|
#ifndef parseH |
24 |
|
|
#define parseH |
25 |
|
|
//--------------------------------------------------------------------------- |
26 |
|
|
|
27 |
|
|
#ifdef WINDOWS_VERSION |
28 |
|
|
#ifdef BUILT_DLL_PARSEUR |
29 |
|
|
#define DLLPORTPARSEUR __declspec(dllexport) |
30 |
|
|
#else |
31 |
|
|
#define DLLPORTPARSEUR __declspec(dllimport) |
32 |
|
|
#endif |
33 |
|
|
#else |
34 |
|
|
#define DLLPORTPARSEUR |
35 |
|
|
#endif |
36 |
|
|
|
37 |
|
|
#include <vector> |
38 |
|
|
#include <stdio.h> |
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
class DLLPORTPARSEUR PARSE |
43 |
|
|
{ |
44 |
|
|
public: |
45 |
|
|
PARSE(); |
46 |
|
|
~PARSE(); |
47 |
|
|
|
48 |
|
|
|
49 |
|
|
void decode(char *code,std::string masque,class PARS_ARGUMENT *arg); |
50 |
|
|
void decode(const char *code,std::string masque,class PARS_ARGUMENT *arg); |
51 |
|
|
|
52 |
|
|
std::string lire(FILE *in,char fin,int *ierr); |
53 |
|
|
|
54 |
|
|
private: |
55 |
|
|
void decode_old(char *code,char *mask,class PARS_ARGUMENT *arg); |
56 |
|
|
void decode_old(const char *code,char *mask,class PARS_ARGUMENT *arg); |
57 |
|
|
int Match(char *code,char *mask,char **param); |
58 |
|
|
int MatchC(char **ptrC,char **ptrP,char cFin); |
59 |
|
|
int Ouverture(char c); |
60 |
|
|
char Fermeture(int i); |
61 |
|
|
}; |
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
#endif |