Lumiera  0.pre.03
»edit your freedom«
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 77 of file option.hpp.

Public Member Functions

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

Friends

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

Private Attributes

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

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 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 #
Todo:
describe the actual options

Definition at line 57 of file option.cpp.

Member Function Documentation

◆ getSessName()

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

Definition at line 117 of file option.cpp.

◆ getScripts()

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

Definition at line 126 of file option.cpp.

◆ getConfigDefs()

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

Definition at line 134 of file option.cpp.

◆ getPort()

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

Definition at line 149 of file option.cpp.

Referenced by GuiSubsysDescriptor::shouldStart().

+ Here is the caller graph for this function:

◆ isHeadless()

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

Definition at line 141 of file option.cpp.

Referenced by GuiSubsysDescriptor::shouldStart().

+ Here is the caller graph for this function:

Friends And Related Function 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 160 of file option.cpp.

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

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