OTMulti_def.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* OTMulti_def.h
  2. *
  3. * Copyright (C) 2005,2007,2009-2011,2015-2018 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. #define ooSTRUCT OTConstraint
  19. oo_DEFINE_STRUCT (OTConstraint)
  20. oo_STRING (name)
  21. oo_DOUBLE (ranking)
  22. oo_DOUBLE (disharmony)
  23. oo_FROM (2)
  24. oo_DOUBLE (plasticity)
  25. oo_ENDFROM
  26. #if oo_READING
  27. oo_VERSION_UNTIL (2)
  28. our plasticity = 1.0;
  29. oo_VERSION_END
  30. #endif
  31. #if ! oo_READING && ! oo_WRITING
  32. oo_BOOLEAN (tiedToTheLeft)
  33. oo_BOOLEAN (tiedToTheRight)
  34. #endif
  35. oo_END_STRUCT (OTConstraint)
  36. #undef ooSTRUCT
  37. #define ooSTRUCT OTCandidate
  38. oo_DEFINE_STRUCT (OTCandidate)
  39. oo_STRING (string)
  40. oo_INTEGER (numberOfConstraints)
  41. oo_INTVEC16 (marks, numberOfConstraints)
  42. #if ! oo_READING && ! oo_WRITING
  43. oo_DOUBLE (harmony)
  44. oo_DOUBLE (probability)
  45. #endif
  46. oo_END_STRUCT (OTCandidate)
  47. #undef ooSTRUCT
  48. #define ooSTRUCT OTMulti
  49. oo_DEFINE_CLASS (OTMulti, Daata)
  50. oo_FROM (1)
  51. oo_ENUM (kOTGrammar_decisionStrategy, decisionStrategy)
  52. oo_ENDFROM
  53. oo_FROM (2)
  54. oo_DOUBLE (leak)
  55. oo_ENDFROM
  56. oo_INTEGER (numberOfConstraints)
  57. oo_STRUCT_VECTOR (OTConstraint, constraints, numberOfConstraints)
  58. oo_INTEGER_VECTOR (index, numberOfConstraints)
  59. oo_INTEGER (numberOfCandidates)
  60. oo_STRUCT_VECTOR (OTCandidate, candidates, numberOfCandidates)
  61. #if oo_READING
  62. OTMulti_sort (this);
  63. #endif
  64. #if oo_DECLARING
  65. void v_info ()
  66. override;
  67. #endif
  68. oo_END_CLASS (OTMulti)
  69. #undef ooSTRUCT
  70. /* End of file OTMulti_def.h */