Skip to content
Snippets Groups Projects
Commit d0ad70f5 authored by Jeremie Deray's avatar Jeremie Deray
Browse files

add FrameBase::getCaptureOf given capture type

parent 09d631f3
No related branches found
No related tags found
1 merge request!130Get capture of
...@@ -133,6 +133,7 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase ...@@ -133,6 +133,7 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase
CaptureBaseList& getCaptureList(); CaptureBaseList& getCaptureList();
CaptureBasePtr addCapture(CaptureBasePtr _capt_ptr); CaptureBasePtr addCapture(CaptureBasePtr _capt_ptr);
CaptureBasePtr getCaptureOf(const SensorBasePtr _sensor_ptr); CaptureBasePtr getCaptureOf(const SensorBasePtr _sensor_ptr);
CaptureBasePtr getCaptureOf(const SensorBasePtr _sensor_ptr, const std::string& type);
CaptureBaseList getCapturesOf(const SensorBasePtr _sensor_ptr); CaptureBaseList getCapturesOf(const SensorBasePtr _sensor_ptr);
void unlinkCapture(CaptureBasePtr _cap_ptr); void unlinkCapture(CaptureBasePtr _cap_ptr);
...@@ -318,6 +319,16 @@ inline CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr) ...@@ -318,6 +319,16 @@ inline CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr)
return nullptr; return nullptr;
} }
inline CaptureBasePtr
FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr, const std::string& type)
{
for (CaptureBasePtr capture_ptr : getCaptureList())
if (capture_ptr->getSensorPtr() == _sensor_ptr &&
capture_ptr->getType() == type)
return capture_ptr;
return nullptr;
}
inline CaptureBaseList FrameBase::getCapturesOf(const SensorBasePtr _sensor_ptr) inline CaptureBaseList FrameBase::getCapturesOf(const SensorBasePtr _sensor_ptr)
{ {
CaptureBaseList captures; CaptureBaseList captures;
......
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