X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=tests%2Flib%2Futils%2Frun-in.cpp;fp=tests%2Flib%2Futils%2Frun-in.cpp;h=e31bbc58a26ab511e306c61b4eea9d5bd3fe9470;hp=91b23396e7fbcd6650cd1589baeab69d738ad86d;hb=a72c7ff699753ebaf571b69389354c40967731e7;hpb=1a5aac02b3747a5b87f27a18468f3d15f545356d diff --git a/tests/lib/utils/run-in.cpp b/tests/lib/utils/run-in.cpp index 91b23396..e31bbc58 100644 --- a/tests/lib/utils/run-in.cpp +++ b/tests/lib/utils/run-in.cpp @@ -27,6 +27,10 @@ void RunIn::onMsgIterInit(bt2::SelfMessageIterator) { } +void RunIn::onMsgIterNext(bt2::SelfMessageIterator, bt2::ConstMessageArray&) +{ +} + namespace { class RunInSource; @@ -37,14 +41,20 @@ public: explicit RunInSourceMsgIter(const bt2::SelfMessageIterator self, bt2::SelfMessageIteratorConfiguration, const bt2::SelfComponentOutputPort port) : - bt2::UserMessageIterator {self, "RUN-IN-SRC-MSG-ITER"} + bt2::UserMessageIterator {self, "RUN-IN-SRC-MSG-ITER"}, + _mRunIn {&port.data()}, _mSelf {self} { - port.data().onMsgIterInit(self); + _mRunIn->onMsgIterInit(self); } - void _next(bt2::ConstMessageArray&) + void _next(bt2::ConstMessageArray& msgs) { + _mRunIn->onMsgIterNext(_mSelf, msgs); } + +private: + RunIn *_mRunIn; + bt2::SelfMessageIterator _mSelf; }; class RunInSource final :