| 1 |
/* OTMulti_def.h |
| 2 |
* |
| 3 |
* Copyright (C) 2005,2007,2009-2011,2015-2019,2022 Paul Boersma |
| 4 |
* |
| 5 |
* This code is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 2 of the License, or (at |
| 8 |
* your option) any later version. |
| 9 |
* |
| 10 |
* This code is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 |
* See the GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
|
| 20 |
#define ooSTRUCT OTConstraint |
| 21 |
oo_DEFINE_STRUCT (OTConstraint) |
| 22 |
|
| 23 |
oo_STRING (name) |
| 24 |
oo_DOUBLE (ranking) |
| 25 |
oo_DOUBLE (disharmony) |
| 26 |
|
| 27 |
oo_FROM (2) |
| 28 |
oo_DOUBLE (plasticity) |
| 29 |
oo_ENDFROM |
| 30 |
#if oo_READING |
| 31 |
oo_VERSION_UNTIL (2) |
| 32 |
our plasticity = 1.0; |
| 33 |
oo_VERSION_END |
| 34 |
#endif |
| 35 |
|
| 36 |
#if ! oo_READING && ! oo_WRITING && ! oo_COMPARING |
| 37 |
oo_BOOLEAN (tiedToTheLeft) |
| 38 |
oo_BOOLEAN (tiedToTheRight) |
| 39 |
#endif |
| 40 |
|
| 41 |
oo_END_STRUCT (OTConstraint) |
| 42 |
#undef ooSTRUCT |
| 43 |
|
| 44 |
|
| 45 |
#define ooSTRUCT OTCandidate |
| 46 |
oo_DEFINE_STRUCT (OTCandidate) |
| 47 |
|
| 48 |
oo_STRING (string) |
| 49 |
oo_INTEGER (numberOfConstraints) |
| 50 |
oo_INTVEC16 (marks, numberOfConstraints) |
| 51 |
|
| 52 |
#if ! oo_READING && ! oo_WRITING && ! oo_COMPARING |
| 53 |
oo_DOUBLE (harmony) |
| 54 |
oo_DOUBLE (probability) |
| 55 |
#endif |
| 56 |
|
| 57 |
oo_END_STRUCT (OTCandidate) |
| 58 |
#undef ooSTRUCT |
| 59 |
|
| 60 |
|
| 61 |
#define ooSTRUCT OTMulti |
| 62 |
oo_DEFINE_CLASS (OTMulti, Daata) |
| 63 |
|
| 64 |
oo_FROM (1) |
| 65 |
oo_ENUM (kOTGrammar_decisionStrategy, decisionStrategy) |
| 66 |
oo_ENDFROM |
| 67 |
oo_FROM (2) |
| 68 |
oo_DOUBLE (leak) |
| 69 |
oo_ENDFROM |
| 70 |
oo_INTEGER (numberOfConstraints) |
| 71 |
oo_STRUCTVEC (OTConstraint, constraints, numberOfConstraints) |
| 72 |
oo_INTVEC (index, numberOfConstraints) |
| 73 |
oo_INTEGER (numberOfCandidates) |
| 74 |
oo_STRUCTVEC (OTCandidate, candidates, numberOfCandidates) |
| 75 |
|
| 76 |
#if oo_READING |
| 77 |
OTMulti_sort (this); |
| 78 |
#endif |
| 79 |
|
| 80 |
#if oo_DECLARING |
| 81 |
void v1_info () |
| 82 |
override; |
| 83 |
#endif |
| 84 |
|
| 85 |
oo_END_CLASS (OTMulti) |
| 86 |
#undef ooSTRUCT |
| 87 |
|
| 88 |
|
| 89 |
/* End of file OTMulti_def.h */ |