/src/lib/cli/internal/clarg_nop.e

http://github.com/tybor/Liberty · Specman e · 93 lines · 56 code · 14 blank · 23 comment · 0 complexity · 51a9d19a1ad16454cb6904ac0d758a18 MD5 · raw file

  1. -- This file is part of a Liberty Eiffel library.
  2. -- See the full copyright at the end.
  3. --
  4. class CLARG_NOP
  5. inherit
  6. COMMAND_LINE_ARGUMENT
  7. redefine
  8. out_in_tagged_out_memory
  9. end
  10. insert
  11. ARGUMENTS
  12. redefine
  13. out_in_tagged_out_memory
  14. end
  15. create {COMMAND_LINE_ARGUMENT_FACTORY}
  16. make
  17. feature {ANY}
  18. is_set: BOOLEAN
  19. is_mandatory: BOOLEAN False
  20. is_repeatable: BOOLEAN False
  21. out_in_tagged_out_memory
  22. do
  23. tagged_out_memory.append(once "<no parameters>")
  24. end
  25. feature {COMMAND_LINE_ARGUMENTS, COMMAND_LINE_ARGUMENT}
  26. prepare_parse
  27. do
  28. is_set := False
  29. end
  30. parse_command_line (context: COMMAND_LINE_CONTEXT): COMMAND_LINE_CONTEXT
  31. do
  32. Result := context
  33. is_set := argument_count = 0
  34. ensure
  35. Result.is_parsed
  36. Result.index = context.index
  37. end
  38. usage_summary (stream: OUTPUT_STREAM)
  39. do
  40. detailed := False
  41. end
  42. usage_details (stream: OUTPUT_STREAM)
  43. do
  44. detailed := True
  45. end
  46. undo_parse (context: COMMAND_LINE_CONTEXT)
  47. do
  48. is_set := False
  49. end
  50. is_set_at (context: COMMAND_LINE_CONTEXT): BOOLEAN
  51. do
  52. Result := is_set
  53. end
  54. feature {}
  55. make
  56. do
  57. end
  58. detailed: BOOLEAN
  59. end -- class CLARG_NOP
  60. --
  61. -- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
  62. --
  63. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  64. -- of this software and associated documentation files (the "Software"), to deal
  65. -- in the Software without restriction, including without limitation the rights
  66. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  67. -- copies of the Software, and to permit persons to whom the Software is
  68. -- furnished to do so, subject to the following conditions:
  69. --
  70. -- The above copyright notice and this permission notice shall be included in
  71. -- all copies or substantial portions of the Software.
  72. --
  73. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  74. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  75. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  76. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  77. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  78. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  79. -- THE SOFTWARE.