Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
a92fdfcf
Commit
a92fdfcf
authored
6 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
FrameBase const qualifier changes
parent
2c4a551e
No related branches found
No related tags found
1 merge request
!301
Resolve "Work on const / non-const in wolf base classes"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/frame/frame_base.h
+8
-8
8 additions, 8 deletions
include/core/frame/frame_base.h
src/frame/frame_base.cpp
+6
-6
6 additions, 6 deletions
src/frame/frame_base.cpp
with
14 additions
and
14 deletions
include/core/frame/frame_base.h
+
8
−
8
View file @
a92fdfcf
...
@@ -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_
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/frame/frame_base.cpp
+
6
−
6
View file @
a92fdfcf
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment