36 typedef boost::program_options::options_description Syntax;
37 typedef boost::program_options::variables_map VarMap;
39 namespace op = boost::program_options;
58 : syntax(
"Lumiera, the non linear video editor.\nSupported parameters"),
62 (
"help,h",
"produce help message")
63 (
"session,f", op::value<string>(),
64 "session file to load (UNIMPLEMENTED)")
65 (
"script,s", op::value<VectS>(),
66 "execute the given script (UNIMPLEMENTED)")
67 (
"headless", op::bool_switch(),
69 (
"port,p", op::value<int>(),
70 "open renderfarm node at given port (UNIMPLEMENTED)")
71 (
"define,def,D",op::value<VectS>(),
72 "enter definition into config system (UNIMPLEMENTED)")
76 op::positional_options_description posopt;
77 posopt.add(
"session", 1);
79 op::parsed_options parsed =
80 op::command_line_parser (cmdline)
86 op::store (parsed, parameters);
87 op::notify(parameters);
90 cmdline = op::collect_unrecognized(parsed.options, op::include_positional);
99 UNIMPLEMENTED (
"feed definitions from commandline to Config system");
119 ASSERT (parameters.count (
"session"));
120 return parameters[
"session"].as<
string>();
128 return parameters[
"script"].as<VectS>();
136 return parameters[
"define"].as<VectS>();
143 return parameters[
"headless"].as<
bool>();
151 if (parameters.count (
"port"))
152 return parameters[
"port"].as<int>();
162 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...