tests/lib/utils: add RunIn::onMsgIterNext()
[babeltrace.git] / tests / lib / utils / run-in.cpp
index 91b23396e7fbcd6650cd1589baeab69d738ad86d..e31bbc58a26ab511e306c61b4eea9d5bd3fe9470 100644 (file)
@@ -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<RunInSourceMsgIter, RunInSource> {self, "RUN-IN-SRC-MSG-ITER"}
+        bt2::UserMessageIterator<RunInSourceMsgIter, RunInSource> {self, "RUN-IN-SRC-MSG-ITER"},
+        _mRunIn {&port.data<RunIn>()}, _mSelf {self}
     {
-        port.data<RunIn>().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 :
This page took 0.023158 seconds and 4 git commands to generate.