Initial commit
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
|
||||
#include <wfr/common/wfs/instances/AtomicActivityInstance.h>
|
||||
#include <wfr/common/wfs/templates/AtomicActivityTemplate.h>
|
||||
#include <wfr/common/wfs/Activity.h>
|
||||
|
||||
|
||||
namespace wfr {
|
||||
namespace wfs {
|
||||
|
||||
bool AtomicActivityInstance::executePreExecutionHooks(bool earlyEvaluation) {
|
||||
bool retval = false;
|
||||
if (getInstanceStatus() == ActivityInstanceStatus::Initialized) {
|
||||
setInstanceStatus(ActivityInstanceStatus::WaitingForData);
|
||||
}
|
||||
auto& templ = baseActivity.baseTemplate.as<AtomicActivityTemplate>();
|
||||
if (templ.inputFuncHook != nullptr) {
|
||||
retval = templ.inputFuncHook(*this);
|
||||
} else {
|
||||
allInputsAvailable = true;
|
||||
setInstanceStatus(ActivityInstanceStatus::ReadyForExecution);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
} /* namespace wfs */
|
||||
} /* namespace wfr */
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user