Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
cmdline.hpp
Go to the documentation of this file.
1/*
2 CMDLINE.hpp - abstraction of the usual commandline, a sequence of strings
3
4 Copyright (C)
5 2008, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
25#ifndef LIB_CMDLINE_H
26#define LIB_CMDLINE_H
27
28#include <vector>
29#include <string>
30
31
32
33namespace lib {
34
35 using std::string;
36 using std::vector;
37 using std::ostream;
38
39 typedef vector<string> VectS;
40
41
48 class Cmdline : public VectS
49 {
50 public:
51 Cmdline (int argc, const char** argv);
52 explicit Cmdline (const string cmdline);
53
54 operator string () const;
55 VectS& operator= (const VectS& source) { return VectS::operator= (source); }
56
57 // inherited ctors
58 template <class In>
59 Cmdline (In first, In last) : VectS (first,last) {}
60 Cmdline () : VectS () {}
61
62 };
63
64
65
66} // namespace lib
67#endif
Abstraction of the usual int argc, int** argv-Commandline, to be able to treat it as a vector of stri...
Definition cmdline.hpp:49
VectS & operator=(const VectS &source)
Definition cmdline.hpp:55
Cmdline(In first, In last)
Definition cmdline.hpp:59
Implementation namespace for support and library code.
vector< string > VectS
Definition cmdline.hpp:39
basic_ostream< char, char_traits< char > > ostream