Initial commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wfr/common/wfs/ActivityTemplate.h>
|
||||
#include <wfr/common/wfs/AtomicActivityType.h>
|
||||
|
||||
|
||||
namespace wfr {
|
||||
namespace wfs {
|
||||
|
||||
|
||||
class AssignActivityTemplate : public ActivityTemplate {
|
||||
friend class ActivityTemplate;
|
||||
|
||||
// Invariant properties that can be accessed directly.
|
||||
public:
|
||||
const InputHookFunc inputFuncHook;
|
||||
const ExecutionHookFunc execFuncHook;
|
||||
|
||||
// Non-public functions.
|
||||
private:
|
||||
AssignActivityTemplate( wfr_id_t id,
|
||||
const std::string& name,
|
||||
wfr_id_t parentID,
|
||||
wfr_id_t branchID,
|
||||
const std::initializer_list<wfr_id_t>& succList,
|
||||
const std::initializer_list<wfr_id_t>& predList,
|
||||
InputHookFunc inputFuncHook,
|
||||
ExecutionHookFunc execFuncHook ) noexcept
|
||||
: ActivityTemplate(id, ActivityType::Assign, name, parentID, branchID, succList, predList, false, false, false),
|
||||
inputFuncHook(inputFuncHook), execFuncHook(execFuncHook) {}
|
||||
};
|
||||
|
||||
|
||||
} /* namespace wfs */
|
||||
} /* namespace wfr */
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wfr/common/wfs/ActivityTemplate.h>
|
||||
#include <wfr/common/wfs/AtomicActivityType.h>
|
||||
|
||||
|
||||
namespace wfr {
|
||||
namespace wfs {
|
||||
|
||||
|
||||
class AtomicActivityTemplate : public ActivityTemplate {
|
||||
friend class ActivityTemplate;
|
||||
|
||||
// Invariant properties that can be accessed directly.
|
||||
public:
|
||||
const InputHookFunc inputFuncHook;
|
||||
const std::shared_ptr<AtomicActivityType> atomicActivityType;
|
||||
|
||||
// Non-public functions.
|
||||
private:
|
||||
AtomicActivityTemplate( wfr_id_t id,
|
||||
const std::string& name,
|
||||
wfr_id_t parentID,
|
||||
wfr_id_t branchID,
|
||||
const std::initializer_list<wfr_id_t>& succList,
|
||||
const std::initializer_list<wfr_id_t>& predList,
|
||||
InputHookFunc inputFuncHook,
|
||||
std::shared_ptr<AtomicActivityType> atomicActivityType ) noexcept
|
||||
: ActivityTemplate(id, ActivityType::Atomic, name, parentID, branchID, succList, predList, false, false, false),
|
||||
inputFuncHook(inputFuncHook), atomicActivityType(atomicActivityType) {}
|
||||
};
|
||||
|
||||
|
||||
} /* namespace wfs */
|
||||
} /* namespace wfr */
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wfr/common/wfs/ActivityTemplate.h>
|
||||
|
||||
|
||||
namespace wfr {
|
||||
namespace wfs {
|
||||
|
||||
|
||||
class ConditionalActivityTemplate : public ActivityTemplate {
|
||||
friend class ActivityTemplate;
|
||||
|
||||
// Invariant properties that can be accessed directly.
|
||||
public:
|
||||
const InputHookFunc inputFuncHook;
|
||||
const OutputHookFunc outputFuncHook;
|
||||
const BranchConditionHookFunc branchFuncHook;
|
||||
|
||||
// Non-public functions.
|
||||
private:
|
||||
ConditionalActivityTemplate( wfr_id_t id,
|
||||
const std::string& name,
|
||||
wfr_id_t parentID,
|
||||
wfr_id_t branchID,
|
||||
const std::initializer_list<wfr_id_t>& succList,
|
||||
const std::initializer_list<wfr_id_t>& predList,
|
||||
InputHookFunc inputFuncHook,
|
||||
OutputHookFunc outputFuncHook,
|
||||
BranchConditionHookFunc branchFuncHook ) noexcept
|
||||
: ActivityTemplate(id, ActivityType::Conditional, name, parentID, branchID, succList, predList, true, false, true),
|
||||
inputFuncHook(inputFuncHook), outputFuncHook(outputFuncHook), branchFuncHook(branchFuncHook) {}
|
||||
};
|
||||
|
||||
|
||||
} /* namespace wfs */
|
||||
} /* namespace wfr */
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wfr/common/wfs/ActivityTemplate.h>
|
||||
|
||||
|
||||
namespace wfr {
|
||||
namespace wfs {
|
||||
|
||||
|
||||
class ContainerActivityTemplate : public ActivityTemplate {
|
||||
friend class ActivityTemplate;
|
||||
|
||||
// Invariant properties that can be accessed directly.
|
||||
public:
|
||||
const InputHookFunc inputFuncHook;
|
||||
const OutputHookFunc outputFuncHook;
|
||||
|
||||
// Non-public functions.
|
||||
private:
|
||||
ContainerActivityTemplate( wfr_id_t id,
|
||||
const std::string& name,
|
||||
wfr_id_t parentID,
|
||||
wfr_id_t branchID,
|
||||
const std::initializer_list<wfr_id_t>& succList,
|
||||
const std::initializer_list<wfr_id_t>& predList,
|
||||
InputHookFunc inputFuncHook,
|
||||
OutputHookFunc outputFuncHook ) noexcept
|
||||
: ActivityTemplate(id, ActivityType::Container, name, parentID, branchID, succList, predList, true, false, false),
|
||||
inputFuncHook(inputFuncHook), outputFuncHook(outputFuncHook) {}
|
||||
};
|
||||
|
||||
|
||||
} /* namespace wfs */
|
||||
} /* namespace wfr */
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wfr/common/wfs/ActivityTemplate.h>
|
||||
|
||||
|
||||
namespace wfr {
|
||||
namespace wfs {
|
||||
|
||||
|
||||
class ForLoopActivityTemplate : public ActivityTemplate {
|
||||
friend class ActivityTemplate;
|
||||
|
||||
// Invariant properties that can be accessed directly.
|
||||
public:
|
||||
const InputHookFunc inputFuncHook;
|
||||
const OutputHookFunc outputFuncHook;
|
||||
const ForCounterHookFunc counterFuncHook;
|
||||
const LoopIterationHookFunc iterationFuncHook;
|
||||
const bool isParallel;
|
||||
|
||||
// Non-public functions.
|
||||
private:
|
||||
ForLoopActivityTemplate( wfr_id_t id,
|
||||
const std::string& name,
|
||||
wfr_id_t parentID,
|
||||
wfr_id_t branchID,
|
||||
const std::initializer_list<wfr_id_t>& succList,
|
||||
const std::initializer_list<wfr_id_t>& predList,
|
||||
InputHookFunc inputFuncHook,
|
||||
OutputHookFunc outputFuncHook,
|
||||
ForCounterHookFunc counterFuncHook,
|
||||
LoopIterationHookFunc iterationFuncHook,
|
||||
bool isParallel ) noexcept
|
||||
: ActivityTemplate(id, ActivityType::ForLoop, name, parentID, branchID, succList, predList, true, true, false),
|
||||
inputFuncHook(inputFuncHook), outputFuncHook(outputFuncHook), counterFuncHook(counterFuncHook),
|
||||
iterationFuncHook(iterationFuncHook), isParallel(isParallel) {}
|
||||
};
|
||||
|
||||
|
||||
} /* namespace wfs */
|
||||
} /* namespace wfr */
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wfr/common/wfs/ActivityTemplate.h>
|
||||
|
||||
|
||||
namespace wfr {
|
||||
namespace wfs {
|
||||
|
||||
|
||||
class WhileLoopActivityTemplate : public ActivityTemplate {
|
||||
friend class ActivityTemplate;
|
||||
|
||||
// Invariant properties that can be accessed directly.
|
||||
public:
|
||||
const InputHookFunc inputFuncHook;
|
||||
const OutputHookFunc outputFuncHook;
|
||||
const WhileConditionHookFunc conditionFuncHook;
|
||||
const LoopIterationHookFunc iterationFuncHook;
|
||||
|
||||
// Non-public functions.
|
||||
private:
|
||||
WhileLoopActivityTemplate( wfr_id_t id,
|
||||
const std::string& name,
|
||||
wfr_id_t parentID,
|
||||
wfr_id_t branchID,
|
||||
const std::initializer_list<wfr_id_t>& succList,
|
||||
const std::initializer_list<wfr_id_t>& predList,
|
||||
InputHookFunc inputFuncHook,
|
||||
OutputHookFunc outputFuncHook,
|
||||
WhileConditionHookFunc conditionFuncHook,
|
||||
LoopIterationHookFunc iterationFuncHook ) noexcept
|
||||
: ActivityTemplate(id, ActivityType::WhileLoop, name, parentID, branchID, succList, predList, true, true, false),
|
||||
inputFuncHook(inputFuncHook), outputFuncHook(outputFuncHook), conditionFuncHook(conditionFuncHook),
|
||||
iterationFuncHook(iterationFuncHook) {}
|
||||
};
|
||||
|
||||
|
||||
} /* namespace wfs */
|
||||
} /* namespace wfr */
|
||||
Reference in New Issue
Block a user