paludis Version 3.0.2
The one true package mangler
args_visitor.hh
Go to the documentation of this file.
1/* vim: set sw=4 sts=4 et foldmethod=syntax : */
2
3/*
4 * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
5 * Copyright (c) 2006 Stephen Bennett
6 *
7 * This file is part of the Paludis package manager. Paludis is free software;
8 * you can redistribute it and/or modify it under the terms of the GNU General
9 * Public License version 2, as published by the Free Software Foundation.
10 *
11 * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 * details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18 * Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef PALUDIS_GUARD_ARGS_ARGS_VISITOR_HH
22#define PALUDIS_GUARD_ARGS_ARGS_VISITOR_HH 1
23
24#include <paludis/util/visitor.hh>
25#include <paludis/util/wrapped_forward_iterator.hh>
27#include <paludis/util/pimp.hh>
29#include <string>
30
31/** \file
32 * Declarations for ArgsVisitor.
33 *
34 * \ingroup g_args
35 *
36 * \section Examples
37 *
38 * - None at this time.
39 */
40
41namespace paludis
42{
43 namespace args
44 {
45 class ArgsOption;
46 class StringArg;
47 class AliasArg;
48 class SwitchArg;
49 class IntegerArg;
50 class EnumArg;
51 class StringSetArg;
53
54 /**
55 * Visitor class. Processes command-line options as they are found.
56 *
57 * \ingroup g_args
58 */
60 {
61 private:
63
64 const std::string & get_param(const ArgsOption &);
65
66 std::string env_name(const std::string & long_name) const;
67
68 public:
69 /**
70 * Constructor
71 *
72 * \since 0.49
73 */
75 ArgsHandler::ArgsIterator *,
76 ArgsHandler::ArgsIterator,
77 const std::string &,
78 std::string & remaining_chars,
79 bool no,
80 ArgsOptionSpecifiedness specifiedness);
81
83
84 /// Visit a StringArg.
86
87 /// Visit an AliasArg.
88 void visit(AliasArg &);
89
90 /// Visit a SwitchArg.
92
93 /// Visit an IntegerArg.
95
96 /// Visit an EnumArg.
97 void visit(EnumArg &);
98
99 /// Visit a StringSetArg.
101
102 /// Visit a StringSequenceArg.
104 };
105 }
106}
107
108#endif
Definition pimp.hh:52
Definition args_option.hh:442
Definition args_option.hh:79
void visit(IntegerArg &)
Visit an IntegerArg.
void visit(SwitchArg &)
Visit a SwitchArg.
void visit(EnumArg &)
Visit an EnumArg.
void visit(StringSetArg &)
Visit a StringSetArg.
ArgsVisitor(ArgsHandler::ArgsIterator *, ArgsHandler::ArgsIterator, const std::string &, std::string &remaining_chars, bool no, ArgsOptionSpecifiedness specifiedness)
void visit(AliasArg &)
Visit an AliasArg.
void visit(StringSequenceArg &)
Visit a StringSequenceArg.
void visit(StringArg &)
Visit a StringArg.
Definition args_option.hh:550
Definition args_option.hh:500
Definition args_option.hh:238
Definition args_option.hh:395
Definition args_option.hh:286
Definition args_option.hh:209
#define PALUDIS_VISIBLE
Definition attributes.hh:59
Definition args_dumper.hh:39
Definition about_metadata-fwd.hh:24