Debian Codegraph @

podofo/3rdparty/tclap/IgnoreRestVisitor.h

raw symbols SCIP
1 // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
2
3 /******************************************************************************
4 *
5 * file: IgnoreRestVisitor.h
6 *
7 * Copyright (c) 2003, Michael E. Smoot .
8 * Copyright (c) 2020, Google LLC
9 * All rights reserved.
10 *
11 * See the file COPYING in the top directory of this distribution for
12 * more information.
13 *
14 * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 *
22 *****************************************************************************/
23
24 #ifndef TCLAP_IGNORE_REST_VISITOR_H
25 #define TCLAP_IGNORE_REST_VISITOR_H
26
27 #include <tclap/CmdLineInterface.h>
28 #include <tclap/Visitor.h>
29
30 namespace TCLAP {
31
32 /**
33 * A Visitor that tells the CmdLine to begin ignoring arguments after
34 * this one is parsed.
35 */
36 class IgnoreRestVisitor : public Visitor {
37 public:
38 IgnoreRestVisitor(CmdLineInterface &cmdLine)
39 : Visitor(), cmdLine_(cmdLine) {}
40 void visit() { cmdLine_.beginIgnoring(); }
41
42 private:
43 CmdLineInterface &cmdLine_;
44 };
45 } // namespace TCLAP
46
47 #endif // TCLAP_IGNORE_REST_VISITOR_H