[87db7a] | 1 | /*
|
---|
| 2 | * CommandLineQuery.hpp
|
---|
| 3 | *
|
---|
| 4 | * Created on: Nov 8, 2010
|
---|
| 5 | * Author: heber
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #ifndef COMMANDLINEQUERY_HPP_
|
---|
| 9 | #define COMMANDLINEQUERY_HPP_
|
---|
| 10 |
|
---|
[56f73b] | 11 | // include config.h
|
---|
| 12 | #ifdef HAVE_CONFIG_H
|
---|
| 13 | #include <config.h>
|
---|
| 14 | #endif
|
---|
| 15 |
|
---|
| 16 |
|
---|
[87db7a] | 17 | #include "CommandLineUI/CommandLineDialog.hpp"
|
---|
| 18 |
|
---|
| 19 | class CommandLineDialog::EmptyCommandLineQuery : public Dialog::EmptyQuery {
|
---|
| 20 | public:
|
---|
[f130d4] | 21 | EmptyCommandLineQuery(const std::string &_title, const std::string &_description = "");
|
---|
[87db7a] | 22 | virtual ~EmptyCommandLineQuery();
|
---|
| 23 | virtual bool handle();
|
---|
| 24 | };
|
---|
| 25 |
|
---|
[6af6470] | 26 | class CommandLineDialog::VectorCommandLineQuery : public Dialog::TQuery<Vector> {
|
---|
| 27 | public:
|
---|
| 28 | VectorCommandLineQuery(Parameter<Vector> &_param, const std::string &_title, const std::string &_description = "");
|
---|
| 29 | virtual ~VectorCommandLineQuery();
|
---|
| 30 | virtual bool handle();
|
---|
| 31 | };
|
---|
| 32 |
|
---|
| 33 | class CommandLineDialog::VectorsCommandLineQuery : public Dialog::TQuery< std::vector<Vector> > {
|
---|
| 34 | public:
|
---|
| 35 | VectorsCommandLineQuery(Parameter< std::vector<Vector> > &_param, const std::string &_title, const std::string &_description = "");
|
---|
| 36 | virtual ~VectorsCommandLineQuery();
|
---|
| 37 | virtual bool handle();
|
---|
| 38 | };
|
---|
| 39 |
|
---|
[37a67f] | 40 | /** With the following boost::preprocessor code we generate forward declarations
|
---|
| 41 | * of query class for all desired query types in the Qt specialization class of
|
---|
| 42 | * Dialog.
|
---|
| 43 | */
|
---|
| 44 | #include "UIElements/GlobalListOfParameterQueries.hpp"
|
---|
| 45 | #include "UIElements/Dialog_impl_pre.hpp"
|
---|
| 46 |
|
---|
| 47 | #include <boost/preprocessor/facilities/empty.hpp>
|
---|
| 48 |
|
---|
| 49 | // iterate over all parameter query types for forward declarations
|
---|
| 50 | #if defined GLOBALLISTOFPARAMETERQUERIES_Token && defined GLOBALLISTOFPARAMETERQUERIES_Type
|
---|
| 51 | #define BOOST_PP_LOCAL_MACRO(n) queryclass_definition(~, n, GLOBALLISTOFPARAMETERQUERIES_Token, GLOBALLISTOFPARAMETERQUERIES_Type, CommandLine)
|
---|
| 52 | #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMETERTOKENS-1)
|
---|
| 53 | #include BOOST_PP_LOCAL_ITERATE()
|
---|
| 54 | #undef queryclass_definition
|
---|
| 55 | #endif
|
---|
| 56 |
|
---|
| 57 | #include "Dialog_impl_undef.hpp"
|
---|
| 58 | /* End of preprocessor code piece */
|
---|
[87db7a] | 59 |
|
---|
[33e801] | 60 |
|
---|
[87db7a] | 61 | #endif /* COMMANDLINEQUERY_HPP_ */
|
---|