Skip to content
Snippets Groups Projects
Commit 5f7dd3f2 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Add convenience function TimeDependency::addDependencies

parent 384b2078
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ public:
const DependencyType dep = DEPENDENCY_TYPE_DEFAULT);
virtual ~TimeDependency() {}
void addDependencies(const SignalArray_const<Time> &arr);
void addDependency(const SignalBase<Time> &sig);
void removeDependency(const SignalBase<Time> &sig);
void clearDependency();
......
......@@ -26,14 +26,19 @@ TimeDependency<Time>::TimeDependency(SignalBase<Time> *sig,
const SignalArray_const<Time> &ar,
const DependencyType dep)
: __TIME_DEPENDENCY_INIT(sig, dep) {
for (unsigned int i = 0; i < ar.getSize(); ++i) {
addDependency(ar[i]);
}
addDependencies(ar);
return;
}
/* ------------------------------------------------------------------------ */
template <class Time>
void TimeDependency<Time>::addDependencies(const SignalArray_const<Time> &ar) {
for (unsigned int i = 0; i < ar.getSize(); ++i) {
addDependency(ar[i]);
}
}
template <class Time>
void TimeDependency<Time>::addDependency(const SignalBase<Time> &sig) {
dependencies.push_front(&sig);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment