| [0b2ce9] | 1 | /*
 | 
|---|
 | 2 |  * Action_impl.hpp
 | 
|---|
 | 3 |  *
 | 
|---|
 | 4 |  *  Created on: Aug 25, 2010
 | 
|---|
 | 5 |  *      Author: heber
 | 
|---|
 | 6 |  */
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | /** These macros define the following functions, necessary but repetitive for
 | 
|---|
 | 9 |  * every Action:
 | 
|---|
 | 10 |  *  -# Dialog* fillDialog()
 | 
|---|
 | 11 |  *  -# action command (e.g. AnalysisMolecularVolume() )
 | 
|---|
 | 12 |  *  -# void getParametersfromValuStorage()
 | 
|---|
 | 13 |  *  -# struct Action...Parameters
 | 
|---|
 | 14 |  *
 | 
|---|
 | 15 |  *  For this, the user has the define the following values, each with
 | 
|---|
| [b4fa106] | 16 |  *  parenthesis, for the values/parameters the action needs
 | 
|---|
 | 17 |  *  -# paramtypes, e.g. (int)(double)
 | 
|---|
 | 18 |  *  -# paramtokens, e.g. ("Z")("length")
 | 
|---|
 | 19 |  *  -# paramreferences, e.g. (Z)(length)
 | 
|---|
 | 20 |  *  and for additional values/parameters to save in the state
 | 
|---|
 | 21 |  *  -# statetypes, e.g. (int)(double)
 | 
|---|
 | 22 |  *  -# statereferences, e.g. (Z)(length)
 | 
|---|
 | 23 |  *  and the name and category of the action
 | 
|---|
| [0b2ce9] | 24 |  *  -# CATEGORY, e.g. Analysis
 | 
|---|
 | 25 |  *  -# ACTIONNAME, e.g. MolecularVolume
 | 
|---|
 | 26 |  */
 | 
|---|
 | 27 | 
 | 
|---|
| [56f73b] | 28 | // include config.h
 | 
|---|
 | 29 | #ifdef HAVE_CONFIG_H
 | 
|---|
 | 30 | #include <config.h>
 | 
|---|
 | 31 | #endif
 | 
|---|
| [9ee38b] | 32 | 
 | 
|---|
| [862b6a] | 33 | #include "CodePatterns/Chronos.hpp"
 | 
|---|
 | 34 | 
 | 
|---|
| [9ee38b] | 35 | #include <boost/preprocessor/cat.hpp>
 | 
|---|
| [b4fa106] | 36 | #include <boost/preprocessor/expand.hpp>
 | 
|---|
| [9ee38b] | 37 | #include <boost/preprocessor/comparison/equal.hpp>
 | 
|---|
 | 38 | #include <boost/preprocessor/comparison/not_equal.hpp>
 | 
|---|
| [6ba9ba] | 39 | #include <boost/preprocessor/control/expr_if.hpp>
 | 
|---|
| [9ee38b] | 40 | #include <boost/preprocessor/control/if.hpp>
 | 
|---|
 | 41 | #include <boost/preprocessor/debug/assert.hpp>
 | 
|---|
 | 42 | #include <boost/preprocessor/iteration/local.hpp>
 | 
|---|
| [6ba9ba] | 43 | #include <boost/preprocessor/list/adt.hpp>
 | 
|---|
| [9ee38b] | 44 | #include <boost/preprocessor/punctuation/comma_if.hpp>
 | 
|---|
 | 45 | #include <boost/preprocessor/repetition/repeat.hpp>
 | 
|---|
 | 46 | #include <boost/preprocessor/seq/elem.hpp>
 | 
|---|
 | 47 | #include <boost/preprocessor/seq/push_back.hpp>
 | 
|---|
 | 48 | #include <boost/preprocessor/seq/seq.hpp>
 | 
|---|
 | 49 | #include <boost/preprocessor/seq/size.hpp>
 | 
|---|
 | 50 | #include <boost/preprocessor/seq/transform.hpp>
 | 
|---|
 | 51 | 
 | 
|---|
| [628577] | 52 | #include "Actions/ActionQueue.hpp"
 | 
|---|
| [f10b0c] | 53 | #include "Parameters/Parameter.hpp"
 | 
|---|
 | 54 | 
 | 
|---|
| [649aaa] | 55 | 
 | 
|---|
| [e4afb4] | 56 | // some derived names: if CATEGORY is not given, we don't prefix with it
 | 
|---|
 | 57 | #ifdef CATEGORY
 | 
|---|
| [9ee38b] | 58 | #define ACTION BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Action))
 | 
|---|
 | 59 | #define COMMAND BOOST_PP_CAT(CATEGORY, ACTIONNAME)
 | 
|---|
 | 60 | #define STATE BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, State))
 | 
|---|
 | 61 | #define PARAMS BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Parameters))
 | 
|---|
| [e4afb4] | 62 | #else
 | 
|---|
 | 63 | #define ACTION BOOST_PP_CAT(ACTIONNAME, Action)
 | 
|---|
 | 64 | #define COMMAND ACTIONNAME
 | 
|---|
 | 65 | #define STATE BOOST_PP_CAT(ACTIONNAME, State)
 | 
|---|
 | 66 | #define PARAMS BOOST_PP_CAT(ACTIONNAME, Parameters)
 | 
|---|
 | 67 | #endif
 | 
|---|
| [2a6a2c] | 68 | #define INSTANCE BOOST_PP_CAT(this_, BOOST_PP_CAT(ACTIONNAME, _instance))
 | 
|---|
| [9ee38b] | 69 | 
 | 
|---|
 | 70 | // check if no lists given
 | 
|---|
| [b4fa106] | 71 | #ifndef paramtypes
 | 
|---|
 | 72 | #define MAXPARAMTYPES 0
 | 
|---|
| [9ee38b] | 73 | #else
 | 
|---|
| [b4fa106] | 74 | #define MAXPARAMTYPES BOOST_PP_SEQ_SIZE(paramtypes)
 | 
|---|
 | 75 | #endif
 | 
|---|
 | 76 | #ifndef statetypes
 | 
|---|
 | 77 | #define MAXSTATETYPES 0
 | 
|---|
 | 78 | #else
 | 
|---|
 | 79 | #define MAXSTATETYPES BOOST_PP_SEQ_SIZE(statetypes)
 | 
|---|
| [9ee38b] | 80 | #endif
 | 
|---|
| [6ba9ba] | 81 | #ifndef paramdefaults
 | 
|---|
 | 82 | #define MAXPARAMDEFAULTS 0
 | 
|---|
 | 83 | // this is required for valid_print "else part"
 | 
|---|
 | 84 | #define sequencer(z,n,data) \
 | 
|---|
 | 85 |   BOOST_PP_SEQ_PUSH_BACK( data, NOPARAM_DEFAULT)
 | 
|---|
 | 86 | #define paramdefaults BOOST_PP_REPEAT( MAXPARAMTYPES, sequencer, BOOST_PP_SEQ_NIL )
 | 
|---|
 | 87 | #else
 | 
|---|
 | 88 | #define MAXPARAMDEFAULTS BOOST_PP_SEQ_SIZE(paramdefaults)
 | 
|---|
 | 89 | #endif
 | 
|---|
 | 90 | #define PARAM_DEFAULT(x) \
 | 
|---|
 | 91 |     (x, BOOST_PP_NIL)
 | 
|---|
| [9ee38b] | 92 | 
 | 
|---|
 | 93 | // check user has given name and category
 | 
|---|
 | 94 | #ifndef ACTIONNAME
 | 
|---|
 | 95 | ERROR: No "ACTIONNAME" defined in: __FILE__
 | 
|---|
 | 96 | #endif
 | 
|---|
 | 97 | 
 | 
|---|
 | 98 | // calculate numbers and check whether all have same size
 | 
|---|
| [b4fa106] | 99 | #ifdef paramtokens
 | 
|---|
 | 100 | BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXPARAMTYPES, BOOST_PP_SEQ_SIZE(paramtokens)),\
 | 
|---|
 | 101 |   ERROR: There are not the same number of "paramtokens" and "paramtypes" in: __FILE__ \
 | 
|---|
| [9ee38b] | 102 | )
 | 
|---|
 | 103 | #endif
 | 
|---|
| [b4fa106] | 104 | #ifdef paramreferences
 | 
|---|
 | 105 | BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXPARAMTYPES, BOOST_PP_SEQ_SIZE(paramreferences)),\
 | 
|---|
 | 106 |   ERROR: There are not the same number of "paramtokens" and "paramreferences" in: __FILE__ \
 | 
|---|
 | 107 | )
 | 
|---|
 | 108 | #endif
 | 
|---|
 | 109 | 
 | 
|---|
 | 110 | #ifdef statetypes
 | 
|---|
 | 111 | BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXSTATETYPES, BOOST_PP_SEQ_SIZE(statereferences)),\
 | 
|---|
 | 112 |   ERROR: There are not the same number of "statetypes" and "statereferences" in: __FILE__ \
 | 
|---|
| [9ee38b] | 113 | )
 | 
|---|
 | 114 | #endif
 | 
|---|
 | 115 | 
 | 
|---|
 | 116 | // print a list of type ref followed by a separator, i.e. "int i;"
 | 
|---|
| [b4fa106] | 117 | #define initialiser_print(z,n,initialiserlist) \
 | 
|---|
 | 118 |   BOOST_PP_SEQ_ELEM(n, initialiserlist) \
 | 
|---|
 | 119 |   (BOOST_PP_CAT(_, BOOST_PP_SEQ_ELEM(n, initialiserlist))),
 | 
|---|
 | 120 | 
 | 
|---|
 | 121 | // print a list of ref(_ref) followed by a separator, i.e. "id(_id),"
 | 
|---|
 | 122 | #define type_print(z,n,TYPELIST, VARLIST, separator) \
 | 
|---|
 | 123 |   BOOST_PP_SEQ_ELEM(n, TYPELIST) \
 | 
|---|
 | 124 |   BOOST_PP_SEQ_ELEM(n, VARLIST)\
 | 
|---|
| [9ee38b] | 125 |   separator
 | 
|---|
 | 126 | 
 | 
|---|
 | 127 | // print a list of type ref followed, i.e. "int i, double position"
 | 
|---|
| [b4fa106] | 128 | #define type_list(z,n,TYPELIST,VARLIST) \
 | 
|---|
| [9ee38b] | 129 |   BOOST_PP_COMMA_IF(n)\
 | 
|---|
| [b4fa106] | 130 |   BOOST_PP_SEQ_ELEM(n, TYPELIST) \
 | 
|---|
 | 131 |   BOOST_PP_SEQ_ELEM(n, VARLIST)
 | 
|---|
| [9ee38b] | 132 | 
 | 
|---|
| [b4fa106] | 133 | // prints dialog->query calls for paramtypes with tokens
 | 
|---|
| [9ee38b] | 134 | #define dialog_print(z,n,unused) \
 | 
|---|
 | 135 |   dialog->query<\
 | 
|---|
| [b4fa106] | 136 |   BOOST_PP_SEQ_ELEM(n, paramtypes)\
 | 
|---|
| [f10b0c] | 137 |   >( params. \
 | 
|---|
 | 138 |   BOOST_PP_SEQ_ELEM(n, paramreferences)\
 | 
|---|
 | 139 |   ,\
 | 
|---|
| [b4fa106] | 140 |   BOOST_PP_SEQ_ELEM(n, paramtokens)\
 | 
|---|
| [e4afb4] | 141 |   , Traits.getDescription()\
 | 
|---|
 | 142 |   );
 | 
|---|
| [9ee38b] | 143 | 
 | 
|---|
| [6ba9ba] | 144 | // print an initialiser list, i.e. "var( token, valid (,default) )(,)"
 | 
|---|
 | 145 | #define valid_print(z,n,TOKENLIST, VARLIST, VALIDLIST, DEFAULTLIST) \
 | 
|---|
| [649aaa] | 146 |   BOOST_PP_COMMA_IF(n) \
 | 
|---|
 | 147 |   BOOST_PP_SEQ_ELEM(n, VARLIST) \
 | 
|---|
 | 148 |   ( \
 | 
|---|
 | 149 |   BOOST_PP_SEQ_ELEM(n, TOKENLIST) \
 | 
|---|
 | 150 |   , \
 | 
|---|
 | 151 |   BOOST_PP_SEQ_ELEM(n, VALIDLIST) \
 | 
|---|
| [6ba9ba] | 152 |   BOOST_PP_COMMA_IF( BOOST_PP_NOT( BOOST_PP_LIST_IS_NIL( BOOST_PP_SEQ_ELEM(n, DEFAULTLIST) ) ) ) \
 | 
|---|
 | 153 |   BOOST_PP_EXPR_IF( \
 | 
|---|
 | 154 |       BOOST_PP_NOT( BOOST_PP_LIST_IS_NIL( BOOST_PP_SEQ_ELEM(n, DEFAULTLIST) ) ), \
 | 
|---|
 | 155 |       BOOST_PP_LIST_FIRST( BOOST_PP_SEQ_ELEM(n, DEFAULTLIST) )) \
 | 
|---|
| [649aaa] | 156 |   )
 | 
|---|
 | 157 | 
 | 
|---|
| [6ba9ba] | 158 | // print an initialiser list, i.e. "var( valid . var )(,)"
 | 
|---|
| [649aaa] | 159 | #define validcopy_print(z,n,TOKENLIST, VARLIST, VALID) \
 | 
|---|
 | 160 |   BOOST_PP_COMMA_IF(n) \
 | 
|---|
 | 161 |   BOOST_PP_SEQ_ELEM(n, VARLIST) \
 | 
|---|
 | 162 |   ( \
 | 
|---|
 | 163 |   VALID . \
 | 
|---|
 | 164 |   BOOST_PP_SEQ_ELEM(n, VARLIST) \
 | 
|---|
 | 165 |   )
 | 
|---|
 | 166 | 
 | 
|---|
| [9ee38b] | 167 | // prints set/queryCurrentValue (command) for paramreferences and paramtokens
 | 
|---|
| [f10b0c] | 168 | #define value_print(z, n, container, prefix) \
 | 
|---|
 | 169 |   prefix \
 | 
|---|
 | 170 |   BOOST_PP_SEQ_ELEM(n, container)\
 | 
|---|
 | 171 |   .set(\
 | 
|---|
 | 172 |   BOOST_PP_SEQ_ELEM(n, container)\
 | 
|---|
| [9ee38b] | 173 |   );
 | 
|---|
 | 174 | 
 | 
|---|
| [88ba1f] | 175 | // prints set/queryCurrentValue (command) for paramreferences and paramtokens
 | 
|---|
| [f10b0c] | 176 | #define valuetype_print(z,n,container, types, prefix) \
 | 
|---|
 | 177 |   prefix \
 | 
|---|
 | 178 |   BOOST_PP_SEQ_ELEM(n, container) \
 | 
|---|
 | 179 |   .setAsString( \
 | 
|---|
 | 180 |   BOOST_PP_SEQ_ELEM(n, container) \
 | 
|---|
| [88ba1f] | 181 |   );
 | 
|---|
 | 182 | 
 | 
|---|
 | 183 | #define stringtype std::string
 | 
|---|
 | 184 | 
 | 
|---|
 | 185 | #define type2string(s, data, elem) \
 | 
|---|
 | 186 |         stringtype
 | 
|---|
 | 187 | 
 | 
|---|
 | 188 | 
 | 
|---|
| [0b2ce9] | 189 | #include "Actions/ActionRegistry.hpp"
 | 
|---|
| [3139b2] | 190 | //#include "Actions/ActionTraits.hpp"
 | 
|---|
| [0b2ce9] | 191 | #include "UIElements/Dialog.hpp"
 | 
|---|
 | 192 | 
 | 
|---|
| [e4afb4] | 193 | #ifdef paramtokens
 | 
|---|
 | 194 | #define statenecessary 1
 | 
|---|
 | 195 | #endif
 | 
|---|
 | 196 | #ifndef statetokens
 | 
|---|
 | 197 | #define statenecessary 1
 | 
|---|
 | 198 | #endif
 | 
|---|
| [9ee38b] | 199 | 
 | 
|---|
| [ce7fdc] | 200 | namespace MoleCuilder {
 | 
|---|
 | 201 | 
 | 
|---|
| [b4fa106] | 202 | // =========== memento to remember the state when undoing ===========
 | 
|---|
| [e4afb4] | 203 | #ifdef statenecessary
 | 
|---|
| [b4fa106] | 204 | class STATE : public ActionState {
 | 
|---|
 | 205 | public:
 | 
|---|
 | 206 |   STATE(
 | 
|---|
 | 207 | #if defined statetypes && defined statereferences // if we have parameters, we have to add "_" before each reference and add the params as the last one
 | 
|---|
 | 208 | #define OP(s,data,elem) BOOST_PP_CAT(data, elem)  // OP to add "_"
 | 
|---|
 | 209 | #define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, BOOST_PP_SEQ_PUSH_BACK(statetypes, const ACTION::PARAMS &), BOOST_PP_SEQ_TRANSFORM(OP, _, BOOST_PP_SEQ_PUSH_BACK(statereferences, params)))
 | 
|---|
 | 210 | #else /// if not, params is only list
 | 
|---|
 | 211 | #define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, (const ACTION::PARAMS &), (_params))
 | 
|---|
 | 212 | #endif
 | 
|---|
 | 213 | #define BOOST_PP_LOCAL_LIMITS  (0, MAXSTATETYPES)
 | 
|---|
 | 214 | #include BOOST_PP_LOCAL_ITERATE()
 | 
|---|
 | 215 | ) :
 | 
|---|
 | 216 | #if defined statetypes && defined statereferences // do we have parameters at all?
 | 
|---|
 | 217 | BOOST_PP_REPEAT(MAXSTATETYPES, initialiser_print, statereferences)
 | 
|---|
 | 218 | #endif
 | 
|---|
 | 219 | params(_params)
 | 
|---|
 | 220 |   {}
 | 
|---|
| [0b2ce9] | 221 | 
 | 
|---|
| [b4fa106] | 222 | #if defined statetypes && defined statereferences // do we have parameters at all?
 | 
|---|
 | 223 | #define BOOST_PP_LOCAL_MACRO(n) type_print(~, n, statetypes, statereferences, ;)
 | 
|---|
 | 224 | #define BOOST_PP_LOCAL_LIMITS  (0, MAXSTATETYPES-1)
 | 
|---|
 | 225 | #include BOOST_PP_LOCAL_ITERATE()
 | 
|---|
 | 226 | #endif
 | 
|---|
 | 227 |   ACTION::PARAMS params;
 | 
|---|
 | 228 | };
 | 
|---|
| [e4afb4] | 229 | #endif /* statenecessary */
 | 
|---|
| [0b2ce9] | 230 | 
 | 
|---|
| [2a6a2c] | 231 | // (const) prototype to be placed into the ActionRegistry (must be deleted by registry itself)
 | 
|---|
| [83e90c] | 232 | //const ACTION INSTANCE;
 | 
|---|
 | 233 | //boost::shared_ptr< ACTION > INSTANCE( new ACTION() );
 | 
|---|
| [2a6a2c] | 234 | 
 | 
|---|
| [b4fa106] | 235 | // =========== constructor ===========
 | 
|---|
| [0b2ce9] | 236 | ACTION::ACTION () :
 | 
|---|
| [3139b2] | 237 |   Action(ActionTraits< ACTION >(), false)
 | 
|---|
| [0b2ce9] | 238 | {}
 | 
|---|
 | 239 | 
 | 
|---|
| [b4fa106] | 240 | // =========== destructor ===========
 | 
|---|
| [0b2ce9] | 241 | ACTION::~ACTION ()
 | 
|---|
| [e4afb4] | 242 | {
 | 
|---|
 | 243 |   //std::cout << "Action ACTION is being destroyed." << std::endl;
 | 
|---|
 | 244 | }
 | 
|---|
| [0b2ce9] | 245 | 
 | 
|---|
| [649aaa] | 246 | // =========== parameter constructor ===========
 | 
|---|
 | 247 | ACTION::PARAMS::PARAMS()
 | 
|---|
 | 248 | #if defined paramtokens && defined paramreferences && defined paramvalids
 | 
|---|
 | 249 |       :
 | 
|---|
| [6ba9ba] | 250 | #define BOOST_PP_LOCAL_MACRO(n) valid_print(~, n, paramtokens, paramreferences, paramvalids, paramdefaults)
 | 
|---|
| [649aaa] | 251 | #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
 | 
|---|
 | 252 | #include BOOST_PP_LOCAL_ITERATE()
 | 
|---|
 | 253 | #endif
 | 
|---|
 | 254 |     {}
 | 
|---|
 | 255 | 
 | 
|---|
 | 256 | ACTION::PARAMS::PARAMS(const PARAMS &p)
 | 
|---|
 | 257 | #if defined paramtokens && defined paramreferences
 | 
|---|
 | 258 |       :
 | 
|---|
 | 259 | #define BOOST_PP_LOCAL_MACRO(n) validcopy_print(~, n, paramtokens, paramreferences, p)
 | 
|---|
 | 260 | #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
 | 
|---|
 | 261 | #include BOOST_PP_LOCAL_ITERATE()
 | 
|---|
 | 262 | #endif
 | 
|---|
 | 263 |     {}
 | 
|---|
 | 264 | 
 | 
|---|
| [b4fa106] | 265 | // =========== fill a dialog ===========
 | 
|---|
| [0b2ce9] | 266 | Dialog* ACTION::fillDialog(Dialog *dialog) {
 | 
|---|
 | 267 |         ASSERT(dialog,"No Dialog given when filling actionname's dialog");
 | 
|---|
| [b4fa106] | 268 | #if BOOST_PP_EQUAL(MAXPARAMTYPES,0)
 | 
|---|
| [e4afb4] | 269 |         dialog->queryEmpty(TOKEN, Traits.getDescription());
 | 
|---|
| [0b2ce9] | 270 | #else
 | 
|---|
 | 271 | #define BOOST_PP_LOCAL_MACRO(n) dialog_print(~, n, ~)
 | 
|---|
| [b4fa106] | 272 | #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
 | 
|---|
| [0b2ce9] | 273 | #include BOOST_PP_LOCAL_ITERATE()
 | 
|---|
 | 274 | #endif
 | 
|---|
 | 275 |         return dialog;
 | 
|---|
 | 276 | };
 | 
|---|
 | 277 | 
 | 
|---|
| [862b6a] | 278 | // =========== time the action ===========
 | 
|---|
 | 279 | // we need this here to have the correct function name
 | 
|---|
 | 280 | void ACTION::startTimer() const { Chronos::getInstance().startTiming( std::string( TOKEN ) ); }
 | 
|---|
 | 281 | void ACTION::endTimer() const { Chronos::getInstance().endTiming( std::string( TOKEN ) ); }
 | 
|---|
 | 282 | 
 | 
|---|
| [b4fa106] | 283 | // =========== command for calling action directly ===========
 | 
|---|
 | 284 | void COMMAND(
 | 
|---|
| [f10b0c] | 285 | #if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
 | 
|---|
| [b4fa106] | 286 | #define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, paramtypes, paramreferences)
 | 
|---|
 | 287 | #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
 | 
|---|
 | 288 | #include BOOST_PP_LOCAL_ITERATE()
 | 
|---|
 | 289 | #endif
 | 
|---|
| [05736a] | 290 | )
 | 
|---|
| [0b2ce9] | 291 | {
 | 
|---|
| [1d3563] | 292 |   ACTION *ToCall = dynamic_cast<ACTION*>(ActionQueue::getInstance().getActionByName( TOKEN )); //->clone(params);
 | 
|---|
| [ddde10] | 293 |   //ACTION::PARAMS params;
 | 
|---|
| [f10b0c] | 294 | #if defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
 | 
|---|
 | 295 | #define BOOST_PP_LOCAL_MACRO(n) value_print(~, n, paramreferences, ToCall->params.)
 | 
|---|
| [b4fa106] | 296 | #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
 | 
|---|
| [0b2ce9] | 297 | #include BOOST_PP_LOCAL_ITERATE()
 | 
|---|
 | 298 | #endif
 | 
|---|
| [9ee38b] | 299 |   ToCall->call(Action::NonInteractive);
 | 
|---|
| [0b2ce9] | 300 | };
 | 
|---|
 | 301 | 
 | 
|---|
| [88ba1f] | 302 | void BOOST_PP_CAT( COMMAND, _stringargs)(
 | 
|---|
| [f10b0c] | 303 | #if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
 | 
|---|
| [88ba1f] | 304 | #define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, BOOST_PP_SEQ_TRANSFORM( type2string, , paramtypes), paramreferences)
 | 
|---|
 | 305 | #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
 | 
|---|
 | 306 | #include BOOST_PP_LOCAL_ITERATE()
 | 
|---|
 | 307 | #endif
 | 
|---|
 | 308 |         ) {
 | 
|---|
| [1d3563] | 309 |   ACTION *ToCall = dynamic_cast<ACTION*>(ActionQueue::getInstance().getActionByName( TOKEN )); //->clone(params);
 | 
|---|
| [88ba1f] | 310 |   //ACTION::PARAMS params;
 | 
|---|
| [f10b0c] | 311 | #if defined paramtypes && defined paramtypes && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
 | 
|---|
 | 312 | #define BOOST_PP_LOCAL_MACRO(n) valuetype_print(~, n, paramreferences, paramtypes, ToCall->params. )
 | 
|---|
| [88ba1f] | 313 | #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
 | 
|---|
 | 314 | #include BOOST_PP_LOCAL_ITERATE()
 | 
|---|
 | 315 | #endif
 | 
|---|
 | 316 |   ToCall->call(MoleCuilder::Action::NonInteractive);
 | 
|---|
 | 317 | };
 | 
|---|
 | 318 | 
 | 
|---|
| [ce7fdc] | 319 | }
 | 
|---|
 | 320 | 
 | 
|---|
| [b4fa106] | 321 | // free up defines
 | 
|---|
| [649aaa] | 322 | #undef paramvalids
 | 
|---|
| [b4fa106] | 323 | #undef paramtypes
 | 
|---|
 | 324 | #undef paramtokens
 | 
|---|
 | 325 | #undef paramreferences
 | 
|---|
| [649aaa] | 326 | #undef paramdescriptions
 | 
|---|
 | 327 | #undef paramdefaults
 | 
|---|
| [b4fa106] | 328 | #undef MAXPARAMTYPES
 | 
|---|
| [6ba9ba] | 329 | #undef MAXPARAMDEFAULTS
 | 
|---|
| [b4fa106] | 330 | #undef statetypes
 | 
|---|
 | 331 | #undef statereferences
 | 
|---|
 | 332 | #undef MAXSTATETYPES
 | 
|---|
| [6ba9ba] | 333 | #undef PARAM_DEFAULT
 | 
|---|
| [0b2ce9] | 334 | 
 | 
|---|
| [88ba1f] | 335 | #undef type2string
 | 
|---|
 | 336 | #undef stringtype
 | 
|---|
| [a02f78] | 337 | #undef initialiser_print
 | 
|---|
 | 338 | #undef type_print
 | 
|---|
 | 339 | #undef type_list
 | 
|---|
 | 340 | #undef dialog_print
 | 
|---|
| [6ba9ba] | 341 | #undef sequencer
 | 
|---|
| [649aaa] | 342 | #undef valid_print
 | 
|---|
 | 343 | #undef validcopy_print
 | 
|---|
| [a02f78] | 344 | #undef value_print
 | 
|---|
| [88ba1f] | 345 | #undef valuetype_print
 | 
|---|
| [a02f78] | 346 | 
 | 
|---|
| [9ee38b] | 347 | #undef ACTION
 | 
|---|
 | 348 | #undef COMMAND
 | 
|---|
 | 349 | #undef PARAMS
 | 
|---|
 | 350 | #undef STATE
 | 
|---|
| [2a6a2c] | 351 | #undef INSTANCE
 | 
|---|
| [b4fa106] | 352 | 
 | 
|---|
 | 353 | #undef ACTIONNAME
 | 
|---|
 | 354 | #undef CATEGORY
 | 
|---|
| [9ee38b] | 355 | #undef TOKEN
 | 
|---|