27 typedef boost::program_options::options_description Syntax;
28 typedef boost::program_options::variables_map VarMap;
30 namespace op = boost::program_options;
49 : syntax(
"Lumiera, the non linear video editor.\nSupported parameters"),
53 (
"help,h",
"produce help message")
54 (
"session,f", op::value<string>(),
55 "session file to load (UNIMPLEMENTED)")
56 (
"script,s", op::value<VectS>(),
57 "execute the given script (UNIMPLEMENTED)")
58 (
"headless", op::bool_switch(),
60 (
"port,p", op::value<int>(),
61 "open renderfarm node at given port (UNIMPLEMENTED)")
62 (
"define,def,D",op::value<VectS>(),
63 "enter definition into config system (UNIMPLEMENTED)")
67 op::positional_options_description posopt;
68 posopt.add(
"session", 1);
70 op::parsed_options parsed =
71 op::command_line_parser (cmdline)
77 op::store (parsed, parameters);
78 op::notify(parameters);
81 cmdline = op::collect_unrecognized(parsed.options, op::include_positional);
90 UNIMPLEMENTED (
"feed definitions from commandline to Config system");
110 ASSERT (parameters.count (
"session"));
111 return parameters[
"session"].as<
string>();
119 return parameters[
"script"].as<VectS>();
127 return parameters[
"define"].as<VectS>();
134 return parameters[
"headless"].as<
bool>();
142 if (parameters.count (
"port"))
143 return parameters[
"port"].as<int>();
153 return os << ops.syntax;
const VectS getConfigDefs()
bool isOpenSession()
should an existing session file be loaded?
Option(lib::Cmdline &cmdline)
set up an options parser to use the application commandline.
Frontend for handling the Lumiera application commandline arguments.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
friend ostream & operator<<(ostream &, const Option &)
for outputting the help messages.
front-end for handling the commandline arguments.
bool isHelp()
syntax help requested?
bool isConfigDefs()
additional Config defs to fed to config system?
Lumiera error handling (C++ interface).
const string getSessName()
Lumiera public interface.
Abstraction of the usual int argc, int** argv-Commandline, to be able to treat it as a vector of stri...