Simple.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* Simple.cpp
  2. *
  3. * Copyright (C) 1992-2012,2015,2017 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. #include "Simple.h"
  19. #include "oo_DESTROY.h"
  20. #include "Simple_def.h"
  21. #include "oo_COPY.h"
  22. #include "Simple_def.h"
  23. #include "oo_EQUAL.h"
  24. #include "Simple_def.h"
  25. #include "oo_CAN_WRITE_AS_ENCODING.h"
  26. #include "Simple_def.h"
  27. #include "oo_WRITE_TEXT.h"
  28. #include "Simple_def.h"
  29. #include "oo_WRITE_BINARY.h"
  30. #include "Simple_def.h"
  31. #include "oo_READ_TEXT.h"
  32. #include "Simple_def.h"
  33. #include "oo_READ_BINARY.h"
  34. #include "Simple_def.h"
  35. #include "oo_DESCRIPTION.h"
  36. #include "Simple_def.h"
  37. Thing_implement (SimpleInteger, Daata, 0);
  38. autoSimpleInteger SimpleInteger_create (integer number) {
  39. autoSimpleInteger me = Thing_new (SimpleInteger);
  40. my number = number;
  41. return me;
  42. }
  43. Thing_implement (SimpleDouble, Daata, 0);
  44. autoSimpleDouble SimpleDouble_create (double number) {
  45. autoSimpleDouble me = Thing_new (SimpleDouble);
  46. my number = number;
  47. return me;
  48. }
  49. Thing_implement (SimpleString, Daata, 0);
  50. autoSimpleString SimpleString_create (conststring32 string) {
  51. autoSimpleString me = Thing_new (SimpleString);
  52. my string = Melder_dup (string);
  53. return me;
  54. }
  55. int SimpleString_compare (SimpleString me, SimpleString thee) noexcept {
  56. return str32cmp (my string.get(), thy string.get());
  57. }
  58. /* End of file Simple.cpp */