ForceAnnealing_goodresults
ForceAnnealing_tocheck
Last change
on this file since 7f3f9c was 37a67f, checked in by Frederik Heber <heber@…>, 10 years ago |
Replaced Query.. class and query..() function declarations in Dialog.. by boost preprocessor magic.
- this removes a lot of copy&paste code.
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[738ae1] | 1 | /*
|
---|
| 2 | * TextQuery.hpp
|
---|
| 3 | *
|
---|
| 4 | * Created on: Nov 8, 2010
|
---|
| 5 | * Author: heber
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #ifndef TEXTQUERY_HPP_
|
---|
| 9 | #define TEXTQUERY_HPP_
|
---|
| 10 |
|
---|
[56f73b] | 11 | // include config.h
|
---|
| 12 | #ifdef HAVE_CONFIG_H
|
---|
| 13 | #include <config.h>
|
---|
| 14 | #endif
|
---|
| 15 |
|
---|
| 16 |
|
---|
[738ae1] | 17 | #include "TextUI/TextDialog.hpp"
|
---|
| 18 |
|
---|
| 19 | class TextDialog::EmptyTextQuery : public Dialog::EmptyQuery {
|
---|
| 20 | public:
|
---|
[f130d4] | 21 | EmptyTextQuery(const std::string &_title, const std::string &_description = NULL);
|
---|
[738ae1] | 22 | virtual ~EmptyTextQuery();
|
---|
| 23 | virtual bool handle();
|
---|
| 24 | };
|
---|
| 25 |
|
---|
| 26 |
|
---|
[37a67f] | 27 | /** With the following boost::preprocessor code we generate forward declarations
|
---|
| 28 | * of query class for all desired query types in the Qt specialization class of
|
---|
| 29 | * Dialog.
|
---|
| 30 | */
|
---|
| 31 | #include "UIElements/GlobalListOfParameterQueries.hpp"
|
---|
| 32 | #include "UIElements/Dialog_impl_pre.hpp"
|
---|
[33e801] | 33 |
|
---|
[37a67f] | 34 | #include <boost/preprocessor/facilities/empty.hpp>
|
---|
[33e801] | 35 |
|
---|
[37a67f] | 36 | // iterate over all parameter query types for forward declarations
|
---|
| 37 | #if defined GLOBALLISTOFPARAMETERQUERIES_Token && defined GLOBALLISTOFPARAMETERQUERIES_Type
|
---|
| 38 | #define BOOST_PP_LOCAL_MACRO(n) queryclass_definition(~, n, GLOBALLISTOFPARAMETERQUERIES_Token, GLOBALLISTOFPARAMETERQUERIES_Type, Text)
|
---|
| 39 | #define BOOST_PP_LOCAL_LIMITS (0, MAXPARAMETERTOKENS-1)
|
---|
| 40 | #include BOOST_PP_LOCAL_ITERATE()
|
---|
| 41 | #undef queryclass_definition
|
---|
| 42 | #endif
|
---|
[738ae1] | 43 |
|
---|
[37a67f] | 44 | #include "Dialog_impl_undef.hpp"
|
---|
| 45 | /* End of preprocessor code piece */
|
---|
[738ae1] | 46 |
|
---|
| 47 |
|
---|
| 48 | #endif /* TEXTQUERY_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.