29 #include "../include/charon-core/ForStatement.h"
31 #define INVALID_VALUE -1000
36 "<h2>Statement module to be used in counting loops</h2><br>"
37 "Statement module to be used in loops. This plugin is intended "
38 "for loops (e.g. WhileGroup). It interfaces the loop depending "
39 "on its counter value."
45 initialValue,
"initialValue",
"initial value",
"double" );
49 finalValue,
"finalValue",
"final value",
"double" );
52 "ForStatement to interface to the external loop",
55 _currentValue = int(INVALID_VALUE);
63 if (_currentValue == INVALID_VALUE) _currentValue = _initialValue;
64 else _currentValue += _incrementValue;
68 void ForStatement::reset()
70 _currentValue = int(INVALID_VALUE);
93 bool ForStatement::operator ()()
const
95 return (_currentValue < _finalValue);
forstatement_DECLDIR ParameteredObject::build_type getBuildType()
Report build configuration to prevent linking of incompatibel runtime libs.
forstatement_DECLDIR void destroy(ParameteredObject *b)
Deletes an instance of the plugin.
build_type
defined build type
template_type
Integer which represents a template type.
Base class for serializable objects.
Convenience file to iclude all ParameteredObject dependencies and Template functions.
InputSlot< double > initialValue
input slot for initial value
virtual void execute()
Update object.
void _setTags(const std::string &tags)
Register additional tag names for grouping ParameteredObjects.
the object was compiled in release mode
forstatement_DECLDIR ParameteredObject * create(const std::string &name, ParameteredObject::template_type)
Creates an instance of the plugin.
void _addInputSlot(Slot &slot, const std::string &name, const std::string &doc, const std::string &type="")
These functions needs to be called by the derived class in order to register all objects which can be...
OutputSlot< int > currentValue
output slot for current value
ForStatement module to be used in counting loops.
InputSlot< double > incrementValue
input slot for increment value
ForStatement(const std::string &name="")
default constructor
the object was compiled in debug mode
void _addOutputSlot(Slot &slot, const std::string &name, const std::string &doc, const std::string &type="")
Register output slot.
InputSlot< double > finalValue
input slot for final value