#ifndef PERMUT_H #define PERMUT_H #include // #Specbeg: exemple / specbeg struct PERMUT_LINE { char *txt; /* ligne a permuter */ char *info; /* information associee */ }; // #Specend: exemple / specbeg struct PERMUT_ITEM{ PERMUT_LINE *line; int offmot; /* pointeur dans la ligne */ }; #endif /*~LOCAL~*/ struct NAP_FCT{ char flag; /* Utilis‚ par l'application */ char *nom; char *desc; }; class NAP_LIST{ int nbfct; NAP_FCT *tbelm; /*~PROTOBEG~ NAP_LIST */ public: NAP_LIST (const char *fname); NAP_LIST (void); NAP_FCT *getitem (int no); int getnb (void); private: void init (void); public: NAP_FCT *locate (const char *fctname); private: NAP_FCT *locate0 (const char *fctname, int pos); public: NAP_FCT *locatemember (const char *cls, NAP_FCT *fct); NAP_FCT *locatenext (NAP_FCT *info); int parse (const char *fname); ~NAP_LIST (void); /*~PROTOEND~ NAP_LIST */ }; struct COM_SPC{ char *ident; /* Type de sp‚cification */ char *fname; /* Nom du fichier qui contient ce commentaire */ long offset; /* offset dans le fichier, imm‚diatement aprŠs */ /* la d‚claration */ int noline; /* Num‚ro de la ligne ou d‚bute ce commentaire */ int nbcle; /* Nombre de cl‚ */ char **tbcle; /* Liste des mots cl‚s allou‚s dans alloc_ptr */ int usage; /* Nombre de fois que ce commentaire a ‚t‚ */ /* inclus dans le document */ char specbeg; /* Type de format pour specification */ }; class PAGIN_V; class PAGIN; class COM_INDEX{ int nbcom; /* Nombre de commentaires sp‚cifications */ COM_SPC *tbcom; int maxcom; char **alloc_ptr; /* Vecteur pour allou‚s des tables de pointeurs */ int nbptr; /* Nombre de pointeur dans alloc_ptr; */ int maxptr; /*~PROTOBEG~ COM_INDEX */ public: COM_INDEX (void); void addspec (const char *ident, const char *fname, long offset, int noline, char *tbcle[], int nbcle, int specbeg); int chknotused (FILE *fout); int chknotusedp (PAGIN_V *pout, PAGIN_V *pmat); void dump (PAGIN_V *pout, bool xml); int locate (int pos, const char *ident, char *tbcle[], int nbcle, COM_SPC **ptspc); int ok (void); int scanargv (int argc, char *argv[], const char *path, int recur); int scansrc (const char *fname); void sort (void); ~COM_INDEX (void); /*~PROTOEND~ COM_INDEX */ }; /*~PROTO~*/ #ifndef PERMUT_P #define PERMUT_P #include "nadoc.p" #endif