rclcpp  master
C++ ROS Client Library API
init_options.hpp
Go to the documentation of this file.
1 // Copyright 2018 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RCLCPP__INIT_OPTIONS_HPP_
16 #define RCLCPP__INIT_OPTIONS_HPP_
17 
18 #include <memory>
19 
20 #include "rcl/init_options.h"
22 
23 namespace rclcpp
24 {
25 
28 {
29 public:
31  bool shutdown_on_sigint = true;
32 
36 
39  explicit InitOptions(const rcl_init_options_t & init_options);
40 
43  InitOptions(const InitOptions & other);
44 
47  InitOptions &
48  operator=(const InitOptions & other);
49 
51  virtual
52  ~InitOptions();
53 
56  const rcl_init_options_t *
57  get_rcl_init_options() const;
58 
59 protected:
60  void
62 
63 private:
65 };
66 
67 } // namespace rclcpp
68 
69 #endif // RCLCPP__INIT_OPTIONS_HPP_
InitOptions(rcl_allocator_t allocator=rcl_get_default_allocator())
Constructor which allows you to specify the allocator used within the init options.
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
void finalize_init_options()
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
virtual ~InitOptions()
Encapsulation of options for initializing rclcpp.
Definition: init_options.hpp:27
InitOptions & operator=(const InitOptions &other)
Assignment operator.
const rcl_init_options_t * get_rcl_init_options() const
Return the rcl init options.
#define rcl_get_default_allocator
bool shutdown_on_sigint
If true, the context will be shutdown on SIGINT by the signal handler (if it was installed).
Definition: init_options.hpp:31