sensorfw
sensord/parser.h
Go to the documentation of this file.
00001 
00026 #ifndef PARSER_H
00027 #define PARSER_H
00028 
00029 #include <QString>
00030 #include <QStringList>
00031 #include "logging.h"
00032 
00033 class Parser
00034 {
00035 public:
00036 
00037     Parser(QStringList arguments);
00038     ~Parser();
00039 
00040     bool printHelp() const;
00041     bool changeLogLevel() const;
00042     SensordLogLevel getLogLevel() const;
00043 
00044     bool configFileInput() const;
00045     const QString& configFilePath() const;
00046     bool configDirInput() const;
00047     const QString& configDirPath() const;
00048 
00049     bool contextInfo() const;
00050     bool magnetometerCalibration() const;
00051     bool createDaemon() const;
00052     int logTarget() const;
00053     const QString& logFilePath() const;
00054 
00055 private:
00056     void parsingCommandLine(QStringList arguments);
00057 
00058     bool printHelp_;
00059     bool contextInfo_;
00060     bool changeLogLevel_;
00061     bool configFile_;
00062     bool configDir_;
00063     bool daemon_;
00064     bool magnetometerCalibration_;
00065 
00066     QString configFilePath_;
00067     QString configDirPath_;
00068     SensordLogLevel logLevel_;
00069     int logTarget_; //TODO: add some enum about log targets
00070     QString logFilePath_;
00071 };
00072 
00073 #endif // PARSER_H