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
Line 
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
9#include "LinearAlgebra/RealSpaceMatrix.hpp"
10#include <set>
11#include <vector>
12
13class molecule;
14
15#include "LinearAlgebra/defs.hpp"
16#include "Parameters/Validators/DummyValidator.hpp"
17#include "Parameters/Validators/STLVectorValidator.hpp"
18
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"
21// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
22#define paramtypes (std::vector< unsigned int >)
23#define paramtokens ("repeat-box")
24#define paramdescriptions ("number of copies to create per axis")
25#undef paramdefaults
26#define paramreferences (Repeater)
27#define paramvalids \
28(STLVectorValidator< std::vector< unsigned int > >(NDIM, NDIM))
29
30#define statetypes (RealSpaceMatrix)(std::set< molecule *>)
31#define statereferences (olddomain)(oldmolecules)
32
33// some defines for all the names, you may use ACTION, STATE and PARAMS
34#define CATEGORY World
35#define MENUNAME "world"
36#define MENUPOSITION 8
37#define ACTIONNAME RepeatBox
38#define TOKEN "repeat-box"
39
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.