| [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(); | 
|---|
| [f4b6bc9] | 23 | virtual void handle(); | 
|---|
| [87db7a] | 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(); | 
|---|
| [f4b6bc9] | 30 | virtual void handle(); | 
|---|
| [6af6470] | 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(); | 
|---|
| [f4b6bc9] | 37 | virtual void handle(); | 
|---|
| [6af6470] | 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_ */ | 
|---|