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
6d18a269
Commit
6d18a269
authored
8 years ago
by
Jeremie Deray
Browse files
Options
Downloads
Patches
Plain Diff
define macro WOLF_REGISTER_SENSOR & use it with laser2D
parent
a0bf8780
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!80
Toward generic factory
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sensor_factory.h
+4
-0
4 additions, 0 deletions
src/sensor_factory.h
src/sensor_laser_2D.cpp
+3
-1
3 additions, 1 deletion
src/sensor_laser_2D.cpp
with
7 additions
and
1 deletion
src/sensor_factory.h
+
4
−
0
View file @
6d18a269
...
...
@@ -225,6 +225,10 @@ inline std::string Factory<SensorBase,
return
"SensorFactory"
;
}
#define WOLF_REGISTER_SENSOR(SensorType, SensorName) \
const bool SensorName##Registered = \
wolf::SensorFactory::get().registerCreator(SensorType, SensorName::create); \
}
/* namespace wolf */
#endif
/* SENSOR_FACTORY_H_ */
This diff is collapsed.
Click to expand it.
src/sensor_laser_2D.cpp
+
3
−
1
View file @
6d18a269
...
...
@@ -87,7 +87,9 @@ namespace wolf {
//}
namespace
{
const
bool
registered_laser
=
SensorFactory
::
get
().
registerCreator
(
"LASER 2D"
,
SensorLaser2D
::
create
);
//
const bool registered_laser = SensorFactory::get().registerCreator("LASER 2D", SensorLaser2D::create);
//const bool registered_laser_params = IntrinsicsFactory::get().registerCreator("LASER 2D", createIntrinsicsLaser2D);
WOLF_REGISTER_SENSOR
(
"LASER 2D"
,
SensorLaser2D
)
}
}
// namespace wolf
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