tclap 1.4.0
IgnoreRestVisitor.h
Go to the documentation of this file.
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
28#include <tclap/Visitor.h>
29
30namespace TCLAP {
31
36class IgnoreRestVisitor : public Visitor {
37public:
39 : Visitor(), cmdLine_(cmdLine) {}
40 void visit() { cmdLine_.beginIgnoring(); }
41
42private:
43 CmdLineInterface &cmdLine_;
44};
45} // namespace TCLAP
46
47#endif // TCLAP_IGNORE_REST_VISITOR_H
The base class that manages the command line definition and passes along the parsing to the appropria...
virtual void beginIgnoring()=0
Begin ignoring arguments since the "--" argument was specified.
A Visitor that tells the CmdLine to begin ignoring arguments after this one is parsed.
void visit()
This method (to implemented by children) will be called when the visitor is visited.
IgnoreRestVisitor(CmdLineInterface &cmdLine)
A base class that defines the interface for visitors.
Definition Visitor.h:32
Definition Arg.h:52