Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
Option Class Reference

#include "common/option.hpp"

Description

Frontend for handling the Lumiera application commandline arguments.

A preconfigured wrapper around boost::program_options, with the ability to tolerate unknown options. The commandline to be parsed is taken wrapped into a Cmdline instance; after parsing this commandline vector will contain only the remaining unrecognised parts.

Definition at line 68 of file option.hpp.

Public Member Functions

 Option (lib::Cmdline &cmdline)
 set up an options parser to use the application commandline.
 
const string getSessName ()
 
const VectS getScripts ()
 
const VectS getConfigDefs ()
 
int getPort ()
 
bool isOpenSession ()
 should an existing session file be loaded?
 
bool isConfigDefs ()
 additional Config defs to fed to config system?
 
bool isHeadless ()
 
bool isHelp ()
 syntax help requested?
 

Friends

ostream & operator<< (ostream &, const Option &)
 for outputting the help messages.
 

Private Attributes

boost::program_options::options_description syntax
 
boost::program_options::variables_map parameters
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Constructor & Destructor Documentation

◆ Option()

Option ( lib::Cmdline cmdline)

set up an options parser to use the application commandline.

Recognises the following options

--help
[--session] FILENAME
--script FILENAME
--headless
--port #
Namespace of Session and user visible high-level objects.
Definition sequence.hpp:65
Todo:
describe the actual options

Definition at line 48 of file option.cpp.

References Option::isConfigDefs(), Option::isHelp(), Option::parameters, and Option::syntax.

+ Here is the call graph for this function:

Member Function Documentation

◆ getSessName()

const string getSessName ( )
Returns
the name of the session file to open

Definition at line 108 of file option.cpp.

References Option::parameters.

◆ getScripts()

const VectS getScripts ( )
Returns
an (maybe empty) vector containing all specified scripts to run.

Definition at line 117 of file option.cpp.

References Option::parameters.

◆ getConfigDefs()

const VectS getConfigDefs ( )
Returns
an (maybe empty) vector containing any additional Config definitions to set.

Definition at line 125 of file option.cpp.

References Option::parameters.

◆ getPort()

int getPort ( )
Returns
the port number for a render node server or 0 if –port was not specified

Definition at line 140 of file option.cpp.

References Option::parameters.

Referenced by GuiSubsysDescriptor::shouldStart().

+ Here is the caller graph for this function:

◆ isOpenSession()

bool isOpenSession ( )

should an existing session file be loaded?

Definition at line 100 of file option.cpp.

References Option::parameters.

◆ isConfigDefs()

bool isConfigDefs ( )

additional Config defs to fed to config system?

Definition at line 103 of file option.cpp.

References Option::parameters.

Referenced by Option::Option().

+ Here is the caller graph for this function:

◆ isHeadless()

bool isHeadless ( )
Returns
true if –headless switch was given

Definition at line 132 of file option.cpp.

References Option::parameters.

Referenced by GuiSubsysDescriptor::shouldStart().

+ Here is the caller graph for this function:

◆ isHelp()

bool isHelp ( )

syntax help requested?

Definition at line 97 of file option.cpp.

References Option::parameters.

Referenced by Option::Option().

+ Here is the caller graph for this function:

Member Data Documentation

◆ syntax

boost::program_options::options_description syntax
private

Definition at line 86 of file option.hpp.

Referenced by Option::Option().

◆ parameters

Friends And Related Symbol Documentation

◆ operator<<

ostream & operator<< ( ostream &  ,
const Option  
)
friend

for outputting the help messages.

Forward accumulated help messages from all contained option definitions

Definition at line 150 of file option.cpp.

+ Inheritance diagram for Option:
+ Collaboration diagram for Option:

The documentation for this class was generated from the following files: