Main Page
Namespaces
Classes
Files
File List
File Members
src
publish_control_factory.cpp
Go to the documentation of this file.
1
/*
2
* Unpublished Copyright (c) 2009-2018 AutonomouStuff, LLC, All Rights Reserved.
3
*
4
* This file is part of the PACMod ROS 1.0 driver which is released under the MIT license.
5
* See file LICENSE included with this software or go to https://opensource.org/licenses/MIT for full license details.
6
*/
7
8
#include "
publish_control_factory.h
"
9
10
using namespace
AS::Joystick
;
11
12
PublishControlFactory::PublishControlFactory
()
13
{}
14
15
std::unique_ptr<PublishControl>
PublishControlFactory::create
(
int
board_rev)
16
{
17
if
(board_rev == 1 || board_rev == 2)
18
return
std::unique_ptr<PublishControlBoardRev2>(
new
PublishControlBoardRev2
);
19
else
if
(board_rev == 3)
20
return
std::unique_ptr<PublishControlBoardRev3>(
new
PublishControlBoardRev3
);
21
else
22
throw
std::invalid_argument(
"Invalid option."
);
23
}
AS::Joystick::PublishControlBoardRev2
Definition:
publish_control_board_rev2.h:23
AS::Joystick::PublishControlBoardRev3
Definition:
publish_control_board_rev3.h:25
AS::Joystick::PublishControlFactory::create
static std::unique_ptr< PublishControl > create(int board_rev)
Definition:
publish_control_factory.cpp:15
AS::Joystick
Definition:
globals.h:22
publish_control_factory.h
AS::Joystick::PublishControlFactory::PublishControlFactory
PublishControlFactory()
Definition:
publish_control_factory.cpp:12
pacmod_game_control
Author(s): Joe Driscoll
autogenerated on Thu Jun 6 2019 19:19:40