PageRenderTime 35ms CodeModel.GetById 28ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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