Lumiera  0.pre.03
»edit your freedom«
option.hpp
Go to the documentation of this file.
1 /*
2  OPTION.hpp - handle cmdline for starting the Lumiera application
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 
37 #ifndef LUMIERA_OPTION_H
38 #define LUMIERA_OPTION_H
39 
40 #include "lib/nocopy.hpp"
41 #include "lib/cmdline.hpp"
42 #include "lib/format-cout.hpp"
43 
44 #include <string>
45 #include <boost/program_options.hpp>
46 #include <boost/utility.hpp>
47 
48 
49 
50 namespace lumiera {
51 
52  using std::string;
53  using std::ostream;
54  using lib::VectS;
55 
56 
57 
68  class Option
70  {
71  public:
72  Option (lib::Cmdline& cmdline);
73 
74  const string getSessName();
75  const VectS getScripts();
76  const VectS getConfigDefs();
77  int getPort();
78 
79  bool isOpenSession ();
80  bool isConfigDefs();
81  bool isHeadless();
82  bool isHelp();
83 
84 
85  private:
86  boost::program_options::options_description syntax;
87  boost::program_options::variables_map parameters;
88 
89  friend ostream& operator<< (ostream&, const Option&);
90  };
91 
92 
95  ostream& operator<< (ostream& os, const Option& to);
96 
97 
98 } // namespace lumiera
99 #endif
const VectS getConfigDefs()
Definition: option.cpp:125
Automatically use custom string conversion in C++ stream output.
bool isOpenSession()
should an existing session file be loaded?
Definition: option.cpp:100
Option(lib::Cmdline &cmdline)
set up an options parser to use the application commandline.
Definition: option.cpp:48
Any copy and copy construction prohibited.
Definition: nocopy.hpp:37
Frontend for handling the Lumiera application commandline arguments.
Definition: option.hpp:68
bool isHeadless()
Definition: option.cpp:132
Class to encapsulate the typical C-style commandline definition.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
friend ostream & operator<<(ostream &, const Option &)
for outputting the help messages.
Definition: option.cpp:151
bool isHelp()
syntax help requested?
Definition: option.cpp:97
bool isConfigDefs()
additional Config defs to fed to config system?
Definition: option.cpp:103
const string getSessName()
Definition: option.cpp:108
Lumiera public interface.
Definition: advice.cpp:104
Abstraction of the usual int argc, int** argv-Commandline, to be able to treat it as a vector of stri...
Definition: cmdline.hpp:48
const VectS getScripts()
Definition: option.cpp:117