/src/wrappers/glib/library/utilities/g_option_integer_entry.e

http://github.com/tybor/Liberty · Specman e · 57 lines · 41 code · 11 blank · 5 comment · 2 complexity · 776b86599452e44bc1b84222f83bd9ec MD5 · raw file

  1. indexing
  2. description: "."
  3. copyright: "[
  4. Copyright (C) 2007 Paolo Redaelli, Glib developers
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hopeOA that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. class G_OPTION_INTEGER_ENTRY
  19. -- A boolean GOptionEntry.
  20. inherit
  21. G_OPTION_ENTRY
  22. redefine make, fill_tagged_out_memory
  23. end
  24. -- TODO: REFERENCE[INTEGER]
  25. -- undefine copy, is_equal
  26. -- redefine fill_tagged_out_memory
  27. -- end
  28. creation make
  29. feature
  30. make (a_long_name: STRING; a_short_name: CHARACTER; a_description: STRING) is
  31. local t: like argument_type
  32. do
  33. Precursor (a_long_name,a_short_name, a_description)
  34. t.set_int
  35. goption_entry_struct_set_arg(handle, t.value)
  36. goption_entry_struct_set_arg_data(handle, $item)
  37. end
  38. feature -- Queries
  39. item: INTEGER
  40. set_item (an_item: INTEGER) is do item:=an_item end
  41. fill_tagged_out_memory is
  42. do
  43. Precursor
  44. item.append_in(tagged_out_memory)
  45. end
  46. end -- class G_OPTION_INTEGER_ENTRY