source: src/Actions/WorldAction/RepeatBoxAction.def@ 97dff0

Last change on this file since 97dff0 was 6ba9ba, checked in by Frederik Heber <heber@…>, 13 years ago

Default values are properly set by the Action into their (Action)Parameters.

  • we changed the boost::preprocessor magic to accomplish this.
  • NODEFAULT -> NOPARAM_DEFAULT to be safe.
  • it has been a hell of a lot of work to make it possible to add a construct such as ", default" to the call of a function, either the comma or the default is easy but both could only be accomplished via a list contained in the sequence of default values. Because the list has an explicit NIL element which is taken as NOPARAM_DEFAULT.
  • PARAM_DEFAULT is a macro to wrap the default value into a list.
  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[1fd675]1/*
2 * RepeatBoxAction.def
3 *
4 * Created on: Aug 26, 2010
5 * Author: heber
6 */
7
8// all includes and forward declarations necessary for non-integral types below
[45f835]9#include "LinearAlgebra/RealSpaceMatrix.hpp"
10#include <set>
[e1f414]11#include <vector>
[45f835]12
13class molecule;
[1fd675]14
[23958d]15#include "LinearAlgebra/defs.hpp"
[649aaa]16#include "Parameters/Validators/DummyValidator.hpp"
[23958d]17#include "Parameters/Validators/STLVectorValidator.hpp"
[649aaa]18
[1fd675]19// i.e. there is an integer with variable name Z that can be found in
20// ValueStorage by the token "Z" -> first column: int, Z, "Z"
[6ba9ba]21// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
[e1f414]22#define paramtypes (std::vector< unsigned int >)
[d57341]23#define paramtokens ("repeat-box")
[e4afb4]24#define paramdescriptions ("number of copies to create per axis")
25#undef paramdefaults
[1fd675]26#define paramreferences (Repeater)
[23958d]27#define paramvalids \
28(STLVectorValidator< std::vector< unsigned int > >(NDIM, NDIM))
[1fd675]29
[45f835]30#define statetypes (RealSpaceMatrix)(std::set< molecule *>)
31#define statereferences (olddomain)(oldmolecules)
[1fd675]32
33// some defines for all the names, you may use ACTION, STATE and PARAMS
34#define CATEGORY World
[052bfd8]35#define MENUNAME "world"
36#define MENUPOSITION 8
[1fd675]37#define ACTIONNAME RepeatBox
38#define TOKEN "repeat-box"
39
[24fbf3]40
41// finally the information stored in the ActionTrait specialization
42#define DESCRIPTION "create periodic copies of the simulation box per axis"
43#define SHORTFORM "d"
Note: See TracBrowser for help on using the repository browser.