Debian Codegraph @

src/motflechi.h

raw symbols SCIP
1 /* morphomot.h */
2 /* Copyright (C) 2015 Yves Ouvrard
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef MOTFLECHI_H
18 #define MOTFLECHI_H
19
20 #include <QObject>
21 #include <QString>
22 #include <QStringList>
23
24 #include <lemme.h>
25 #include <phrase.h>
26 #include <regle.h>
27 #include <requete.h>
28
29 class Mot;
30 class Phrase;
31 class Regle;
32 class Requete;
33
34 class MotFlechi: public QObject
35 {
36 private:
37 Mot* _mot;
38 QString _det;
39 QString _eqivPos;
40 int _itr;
41 Lemme* _lemme;
42 QString _morpho;
43 bool _neg;
44 int _num;
45 char _pos;
46 char _posO;
47 Phrase* _phrase;
48 bool _rejete;
49 QString _suj;
50 QStringList _traductions; // prises dans lemmes.fr
51 QStringList _trfl; // traductions fléchies
52 QString _trNue; // traduction sans det ni sujet
53 QString _tr;
54 bool _valide;
55 public:
56 MotFlechi(Lemme* l, char p, QString m, Mot* parent, char=0x00);
57 ~MotFlechi();
58 void ajTrfl(QString t);
59 void calcTr(QString m);
60 bool contigu(MotFlechi* mf);
61 QString static elideFr(QString s);
62 QString eqiv();
63 bool estSub();
64 bool estSubParAff(QString aff);
65 bool estSubParId(QString id);
66 bool estSuper();
67 bool estSuperDe(MotFlechi* m);
68 bool estSuperParAff(QString aff);
69 bool estSuperParId(QString id);
70 bool estVerbe();
71 int freq();
72 QString gr();
73 int handicap();
74 QString htmlLiens();
75 void incItr();
76 bool static intersect(QString a, QString b);
77 int itr();
78 void lance();
79 Lemme* lemme();
80 QString morpho();
81 QString morphoHtml();
82 Mot* mot();
83 int nbCloses();
84 int nbReqSub();
85 int nbReqSup();
86 int nbReqSupCloses();
87 int nbReqSupValides(Requete* rtest=0);
88 int nbSuper();
89 int nbTr();
90 bool neg();
91 void nettoie();
92 int num();
93 char pos();
94 char posO();
95 int rang();
96 bool rejete();
97 Requete* reqSub(int i);
98 Requete* reqSub(QString id);
99 Requete* reqSup(int i);
100 bool resout(Requete* req);
101 void setDet(bool f=false);
102 void setItr(int i);
103 void setMorpho(QString m);
104 void setNeg(bool n);
105 void setRejete(bool r);
106 void setSujet();
107 void setTr(QString t);
108 void setValide(bool v);
109 bool sommet();
110 QList<Requete*> sub(QString id, Requete* rtest=0);
111 QString trfl();
112 QString trfl(int i);
113 QString tr();
114 QString trdet();
115 QString trs();
116 QString trGroupe(Requete* rtest=0);
117 QString trNue();
118 bool valide();
119 void videReq();
120 };
121
122 #endif