Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/CommandAction/HelpAction.def

    rdac853c r6ba9ba  
    77
    88// all includes and forward declarations necessary for non-integral types below
     9#include <string>
     10#include <vector>
    911
     12#include "Parameters/Validators/DiscreteValidator.hpp"
     13#include "Parameters/Validators/Ops_Validator.hpp"
     14#include "Parameters/Validators/Specific/ActionNameValidator.hpp"
    1015
    1116// i.e. there is an integer with variable name Z that can be found in
    1217// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     18// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    1419#define paramtypes (std::string)
    1520#define paramtokens ("actionname")
    1621#define paramdescriptions ("Name of an action whose option list is then given")
    17 #define paramdefaults ("none")
     22#define paramdefaults (PARAM_DEFAULT(std::string("none")))
    1823#define paramreferences (actionname)
     24#define paramvalids \
     25(DiscreteValidator<std::string>(std::vector<std::string>(1, std::string("none"))) || ActionNameValidator())
     26// NOTE: The _default_ value MUST NOT require validation via ActionNameValidator!
     27// This will trigger an infinite loop of ActionRegistry::fillRegistry() calls as ActionRegistry is
     28// at the time of the filling on of the default values not yet completely constructed!
    1929
    2030#undef statetypes
Note: See TracChangeset for help on using the changeset viewer.