Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes
CommandLineParser Class Reference
Collaboration diagram for CommandLineParser:
Collaboration graph
[legend]

Public Member Functions

void parse (QApplication const &_app)
 
QString value (QString const &_key) const
 

Private Attributes

std::map< QString, QString > keyValues_
 

Member Function Documentation

void CommandLineParser::parse ( QApplication const &  _app)
inline
33  {
34  QString _argument;
35 
36  for (auto& _arg : _app.arguments()) {
37  if (_arg[0] == '+') {
38  _argument = "";
39 
40  for (int i = 1; i < _arg.size(); ++i) {
41  _argument += _arg[i];
42  }
43  } else {
44  keyValues_[_argument] += _arg + " ";
45  }
46  }
47 
48  for (auto& _keyValue : keyValues_) {
49  _keyValue.second = _keyValue.second.trimmed();
50  }
51  }
std::map< QString, QString > keyValues_
Definition: omnidome.cpp:62
QString CommandLineParser::value ( QString const &  _key) const
inline
53  {
54  if (!keyValues_.count(_key)) {
55  return QString();
56  }
57 
58  return keyValues_.at(_key);
59  }
std::map< QString, QString > keyValues_
Definition: omnidome.cpp:62

Field Documentation

std::map<QString, QString> CommandLineParser::keyValues_
private

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