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 
34 
40  explicit InitOptions(rcl_allocator_t allocator = rcl_get_default_allocator());
41 
43 
49  explicit InitOptions(const rcl_init_options_t & init_options);
50 
53  InitOptions(const InitOptions & other);
54 
57  bool
59 
62  InitOptions &
63  auto_initialize_logging(bool initialize_logging);
64 
67  InitOptions &
68  operator=(const InitOptions & other);
69 
71  virtual
72  ~InitOptions();
73 
75 
80  const rcl_init_options_t *
81  get_rcl_init_options() const;
82 
83 protected:
84  void
86 
87 private:
89  bool initialize_logging_{true};
90 };
91 
92 } // namespace rclcpp
93 
94 #endif // RCLCPP__INIT_OPTIONS_HPP_
rclcpp::InitOptions::~InitOptions
virtual ~InitOptions()
rclcpp::InitOptions::operator=
InitOptions & operator=(const InitOptions &other)
Assignment operator.
rclcpp::InitOptions::InitOptions
InitOptions(rcl_allocator_t allocator=rcl_get_default_allocator())
Constructor.
rclcpp
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
rclcpp::InitOptions::get_rcl_init_options
const rcl_init_options_t * get_rcl_init_options() const
Return the rcl init options.
RCLCPP_PUBLIC
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
rcl_init_options_t
rclcpp::InitOptions::shutdown_on_sigint
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
rclcpp::InitOptions::auto_initialize_logging
bool auto_initialize_logging() const
Return true if logging should be initialized when rclcpp::Context::init is called.
rclcpp::InitOptions::finalize_init_options
void finalize_init_options()
rclcpp::InitOptions
Encapsulation of options for initializing rclcpp.
Definition: init_options.hpp:27
visibility_control.hpp
std::unique_ptr< rcl_init_options_t >