Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
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
50namespace 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
Abstraction of the usual int argc, int** argv-Commandline, to be able to treat it as a vector of stri...
Definition cmdline.hpp:49
Frontend for handling the Lumiera application commandline arguments.
Definition option.hpp:70
const VectS getScripts()
Definition option.cpp:117
const string getSessName()
Definition option.cpp:108
bool isOpenSession()
should an existing session file be loaded?
Definition option.cpp:100
const VectS getConfigDefs()
Definition option.cpp:125
bool isConfigDefs()
additional Config defs to fed to config system?
Definition option.cpp:103
bool isHelp()
syntax help requested?
Definition option.cpp:97
bool isHeadless()
Definition option.cpp:132
boost::program_options::variables_map parameters
Definition option.hpp:87
boost::program_options::options_description syntax
Definition option.hpp:86
friend ostream & operator<<(ostream &, const Option &)
for outputting the help messages.
Definition option.cpp:151
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
Class to encapsulate the typical C-style commandline definition.
Automatically use custom string conversion in C++ stream output.
vector< string > VectS
Definition cmdline.hpp:39
Lumiera public interface.
Definition advice.hpp:102
ostream & operator<<(ostream &os, const Option &ops)
for outputting the help messages.
Definition option.cpp:151
basic_ostream< char, char_traits< char > > ostream
Mix-Ins to allow or prohibit various degrees of copying and cloning.