Skip to content
Snippets Groups Projects
Commit a92fdfcf authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

FrameBase const qualifier changes

parent 2c4a551e
No related branches found
No related tags found
1 merge request!301Resolve "Work on const / non-const in wolf base classes"
...@@ -75,7 +75,7 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase ...@@ -75,7 +75,7 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase
// Frame properties ----------------------------------------------- // Frame properties -----------------------------------------------
public: public:
unsigned int id(); unsigned int id() const;
// get type // get type
bool isKey() const; bool isKey() const;
...@@ -137,14 +137,14 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase ...@@ -137,14 +137,14 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase
FrameBasePtr getNextFrame() const; FrameBasePtr getNextFrame() const;
const CaptureBasePtrList& getCaptureList() const; const CaptureBasePtrList& getCaptureList() const;
CaptureBasePtr getCaptureOf(const SensorBaseConstPtr _sensor_ptr); CaptureBasePtr getCaptureOf(const SensorBaseConstPtr _sensor_ptr) const;
CaptureBasePtr getCaptureOf(const SensorBasePtr _sensor_ptr, const std::string& type); CaptureBasePtr getCaptureOf(const SensorBasePtr _sensor_ptr, const std::string& type) const;
CaptureBasePtrList getCapturesOf(const SensorBasePtr _sensor_ptr); CaptureBasePtrList getCapturesOf(const SensorBasePtr _sensor_ptr) const;
FactorBasePtr getFactorOf(const ProcessorBasePtr _processor_ptr); FactorBasePtr getFactorOf(const ProcessorBasePtr _processor_ptr) const;
FactorBasePtr getFactorOf(const ProcessorBasePtr _processor_ptr, const std::string& type); FactorBasePtr getFactorOf(const ProcessorBasePtr _processor_ptr, const std::string& type) const;
void getFactorList(FactorBasePtrList& _fac_list); void getFactorList(FactorBasePtrList& _fac_list) const;
unsigned int getHits() const; unsigned int getHits() const;
const FactorBasePtrList& getConstrainedByList() const; const FactorBasePtrList& getConstrainedByList() const;
void link(TrajectoryBasePtr); void link(TrajectoryBasePtr);
...@@ -180,7 +180,7 @@ std::shared_ptr<FrameBase> FrameBase::emplace(TrajectoryBasePtr _ptr, T&&... all ...@@ -180,7 +180,7 @@ std::shared_ptr<FrameBase> FrameBase::emplace(TrajectoryBasePtr _ptr, T&&... all
return frm; return frm;
} }
inline unsigned int FrameBase::id() inline unsigned int FrameBase::id() const
{ {
return frame_id_; return frame_id_;
} }
......
...@@ -344,7 +344,7 @@ void FrameBase::removeCapture(CaptureBasePtr _capt_ptr) ...@@ -344,7 +344,7 @@ void FrameBase::removeCapture(CaptureBasePtr _capt_ptr)
capture_list_.remove(_capt_ptr); capture_list_.remove(_capt_ptr);
} }
CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr, const std::string& type) CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr, const std::string& type) const
{ {
for (CaptureBasePtr capture_ptr : getCaptureList()) for (CaptureBasePtr capture_ptr : getCaptureList())
if (capture_ptr->getSensor() == _sensor_ptr && capture_ptr->getType() == type) if (capture_ptr->getSensor() == _sensor_ptr && capture_ptr->getType() == type)
...@@ -352,7 +352,7 @@ CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr, const st ...@@ -352,7 +352,7 @@ CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr, const st
return nullptr; return nullptr;
} }
CaptureBasePtr FrameBase::getCaptureOf(const SensorBaseConstPtr _sensor_ptr) CaptureBasePtr FrameBase::getCaptureOf(const SensorBaseConstPtr _sensor_ptr) const
{ {
for (CaptureBasePtr capture_ptr : getCaptureList()) for (CaptureBasePtr capture_ptr : getCaptureList())
if (capture_ptr->getSensor() == _sensor_ptr) if (capture_ptr->getSensor() == _sensor_ptr)
...@@ -360,7 +360,7 @@ CaptureBasePtr FrameBase::getCaptureOf(const SensorBaseConstPtr _sensor_ptr) ...@@ -360,7 +360,7 @@ CaptureBasePtr FrameBase::getCaptureOf(const SensorBaseConstPtr _sensor_ptr)
return nullptr; return nullptr;
} }
CaptureBasePtrList FrameBase::getCapturesOf(const SensorBasePtr _sensor_ptr) CaptureBasePtrList FrameBase::getCapturesOf(const SensorBasePtr _sensor_ptr) const
{ {
CaptureBasePtrList captures; CaptureBasePtrList captures;
for (CaptureBasePtr capture_ptr : getCaptureList()) for (CaptureBasePtr capture_ptr : getCaptureList())
...@@ -369,7 +369,7 @@ CaptureBasePtrList FrameBase::getCapturesOf(const SensorBasePtr _sensor_ptr) ...@@ -369,7 +369,7 @@ CaptureBasePtrList FrameBase::getCapturesOf(const SensorBasePtr _sensor_ptr)
return captures; return captures;
} }
FactorBasePtr FrameBase::getFactorOf(const ProcessorBasePtr _processor_ptr, const std::string& type) FactorBasePtr FrameBase::getFactorOf(const ProcessorBasePtr _processor_ptr, const std::string& type) const
{ {
for (const FactorBasePtr& factor_ptr : getConstrainedByList()) for (const FactorBasePtr& factor_ptr : getConstrainedByList())
if (factor_ptr->getProcessor() == _processor_ptr && factor_ptr->getType() == type) if (factor_ptr->getProcessor() == _processor_ptr && factor_ptr->getType() == type)
...@@ -377,7 +377,7 @@ FactorBasePtr FrameBase::getFactorOf(const ProcessorBasePtr _processor_ptr, cons ...@@ -377,7 +377,7 @@ FactorBasePtr FrameBase::getFactorOf(const ProcessorBasePtr _processor_ptr, cons
return nullptr; return nullptr;
} }
FactorBasePtr FrameBase::getFactorOf(const ProcessorBasePtr _processor_ptr) FactorBasePtr FrameBase::getFactorOf(const ProcessorBasePtr _processor_ptr) const
{ {
for (const FactorBasePtr& factor_ptr : getConstrainedByList()) for (const FactorBasePtr& factor_ptr : getConstrainedByList())
if (factor_ptr->getProcessor() == _processor_ptr) if (factor_ptr->getProcessor() == _processor_ptr)
...@@ -385,7 +385,7 @@ FactorBasePtr FrameBase::getFactorOf(const ProcessorBasePtr _processor_ptr) ...@@ -385,7 +385,7 @@ FactorBasePtr FrameBase::getFactorOf(const ProcessorBasePtr _processor_ptr)
return nullptr; return nullptr;
} }
void FrameBase::getFactorList(FactorBasePtrList& _fac_list) void FrameBase::getFactorList(FactorBasePtrList& _fac_list) const
{ {
for (auto c_ptr : getCaptureList()) for (auto c_ptr : getCaptureList())
c_ptr->getFactorList(_fac_list); c_ptr->getFactorList(_fac_list);
......
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