tclap 1.2.2
HelpVisitor.h
Go to the documentation of this file.
1
2/******************************************************************************
3 *
4 * file: HelpVisitor.h
5 *
6 * Copyright (c) 2003, Michael E. Smoot .
7 * All rights reserved.
8 *
9 * See the file COPYING in the top directory of this distribution for
10 * more information.
11 *
12 * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
13 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18 * DEALINGS IN THE SOFTWARE.
19 *
20 *****************************************************************************/
21
22#ifndef TCLAP_HELP_VISITOR_H
23#define TCLAP_HELP_VISITOR_H
24
26#include <tclap/CmdLineOutput.h>
27#include <tclap/Visitor.h>
28
29namespace TCLAP {
30
35class HelpVisitor: public Visitor
36{
37 private:
41 HelpVisitor(const HelpVisitor& rhs);
42 HelpVisitor& operator=(const HelpVisitor& rhs);
43
44 protected:
45
50
55
56 public:
57
64 : Visitor(), _cmd( cmd ), _out( out ) { }
65
70 void visit() { (*_out)->usage(*_cmd); throw ExitException(0); }
71
72};
73
74}
75
76#endif
The base class that manages the command line definition and passes along the parsing to the appropria...
The interface that any output object must implement.
void visit()
Calls the usage method of the CmdLineOutput for the specified CmdLine.
Definition HelpVisitor.h:70
HelpVisitor(CmdLineInterface *cmd, CmdLineOutput **out)
Constructor.
Definition HelpVisitor.h:63
CmdLineOutput ** _out
The output object.
Definition HelpVisitor.h:54
CmdLineInterface * _cmd
The CmdLine the output will be generated for.
Definition HelpVisitor.h:49
Visitor()
Constructor.
Definition Visitor.h:38
Definition Arg.h:58