2012-02-06 16:44:09 +01:00
|
|
|
/*
|
2013-05-29 18:43:35 +02:00
|
|
|
* This file is part of the Owl Positioning System (OwlPS) project.
|
|
|
|
* It is subject to the copyright notice and license terms in the
|
|
|
|
* COPYRIGHT.t2t file found in the top-level directory of this
|
|
|
|
* distribution and at
|
2016-11-03 05:10:34 +01:00
|
|
|
* https://code.lm7.fr/mcy/owlps/src/master/COPYRIGHT.t2t
|
2013-05-29 18:43:35 +02:00
|
|
|
* No part of the OwlPS Project, including this file, may be copied,
|
|
|
|
* modified, propagated, or distributed except according to the terms
|
|
|
|
* contained in the COPYRIGHT.t2t file; the COPYRIGHT.t2t file must be
|
|
|
|
* distributed along with this file, either separately or by replacing
|
2013-06-22 23:30:17 +02:00
|
|
|
* this notice by the COPYRIGHT.t2t file's contents.
|
2012-02-06 16:44:09 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2010-02-11 09:46:40 +01:00
|
|
|
#ifndef _OWLPS_POSITIONING_USERINTERFACE_HH_
|
|
|
|
#define _OWLPS_POSITIONING_USERINTERFACE_HH_
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <boost/program_options/options_description.hpp>
|
|
|
|
|
|
|
|
/// Handles configuration inputs from user
|
|
|
|
class UserInterface
|
|
|
|
{
|
|
|
|
protected:
|
2013-06-17 21:54:42 +02:00
|
|
|
const int cli_argument_count ;
|
2013-10-02 20:38:45 +02:00
|
|
|
const char *const *const cli_argument_values ;
|
2010-02-11 09:46:40 +01:00
|
|
|
boost::program_options::options_description *cli_options ;
|
|
|
|
boost::program_options::options_description *file_options ;
|
|
|
|
|
|
|
|
/** @name Operations */
|
|
|
|
//@{
|
2011-06-20 12:11:20 +02:00
|
|
|
/// Fills in all the options
|
2010-02-11 09:46:40 +01:00
|
|
|
void fill_options(void) ;
|
2010-03-23 14:53:37 +01:00
|
|
|
|
2011-06-20 12:11:20 +02:00
|
|
|
/// Fills in the options accepted on the command line
|
2010-02-11 09:46:40 +01:00
|
|
|
void fill_cli_options(void) ;
|
2010-03-23 14:53:37 +01:00
|
|
|
|
2013-06-04 00:39:10 +02:00
|
|
|
/// Fills in the options accepted on the command line and in the
|
|
|
|
/// configuration file
|
2010-02-11 09:46:40 +01:00
|
|
|
void fill_file_options(void) ;
|
2010-04-02 15:49:22 +02:00
|
|
|
void fill_data_input_options(void) ;
|
2010-03-23 14:53:37 +01:00
|
|
|
void fill_input_options(void) ;
|
|
|
|
void fill_log_options(void) ;
|
|
|
|
void fill_positioning_options(void) ;
|
|
|
|
void fill_output_options(void) ;
|
2011-03-29 14:21:14 +02:00
|
|
|
void fill_misc_options(void) ;
|
2010-03-23 14:53:37 +01:00
|
|
|
|
2011-06-20 12:11:20 +02:00
|
|
|
/// Parses all the configuration inputs and updates Configuration
|
2010-02-11 09:46:40 +01:00
|
|
|
void parse_options(void) ;
|
|
|
|
void parse_command_line(void) const ;
|
|
|
|
void parse_file(void) const ;
|
2010-03-23 14:53:37 +01:00
|
|
|
|
2011-06-20 12:11:20 +02:00
|
|
|
/// Prints usage and/or version information if requested by the user
|
2011-08-24 11:41:07 +02:00
|
|
|
void print_information(void) const ;
|
2010-02-11 09:46:40 +01:00
|
|
|
//@}
|
|
|
|
|
|
|
|
public:
|
2013-10-02 20:38:45 +02:00
|
|
|
UserInterface(const int argc, const char *const *const argv) ;
|
2010-02-11 09:46:40 +01:00
|
|
|
|
|
|
|
~UserInterface(void) ;
|
|
|
|
} ;
|
|
|
|
|
|
|
|
#endif // _OWLPS_POSITIONING_USERINTERFACE_HH_
|