rclcpp  master
C++ ROS Client Library API
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
rclcpp::InitOptions Class Reference

Encapsulation of options for initializing rclcpp. More...

#include <init_options.hpp>

Public Member Functions

 InitOptions (rcl_allocator_t allocator=rcl_get_default_allocator())
 Constructor. More...
 
 InitOptions (const rcl_init_options_t &init_options)
 Constructor which is initialized by an existing init_options. More...
 
 InitOptions (const InitOptions &other)
 Copy constructor. More...
 
bool auto_initialize_logging () const
 Return true if logging should be initialized when rclcpp::Context::init is called. More...
 
InitOptionsauto_initialize_logging (bool initialize_logging)
 Set flag indicating if logging should be initialized or not. More...
 
InitOptionsoperator= (const InitOptions &other)
 Assignment operator. More...
 
virtual ~InitOptions ()
 
const rcl_init_options_tget_rcl_init_options () const
 Return the rcl init options. More...
 

Public Attributes

bool shutdown_on_sigint = true
 If true, the context will be shutdown on SIGINT by the signal handler (if it was installed). More...
 

Protected Member Functions

void finalize_init_options ()
 

Detailed Description

Encapsulation of options for initializing rclcpp.

Constructor & Destructor Documentation

◆ InitOptions() [1/3]

rclcpp::InitOptions::InitOptions ( rcl_allocator_t  allocator = rcl_get_default_allocator())
explicit

Constructor.

It allows you to specify the allocator used within the init options.

Parameters
[in]allocatorused allocate memory within the init options
Exceptions
anythingrclcpp::exceptions::throw_from_rcl_error can throw.

◆ InitOptions() [2/3]

rclcpp::InitOptions::InitOptions ( const rcl_init_options_t init_options)
explicit

Constructor which is initialized by an existing init_options.

Initialized by an existing init_options.

Parameters
[in]init_optionsrcl_init_options_t to initialized
Exceptions
anythingrclcpp::exceptions::throw_from_rcl_error can throw.

◆ InitOptions() [3/3]

rclcpp::InitOptions::InitOptions ( const InitOptions other)

Copy constructor.

◆ ~InitOptions()

virtual rclcpp::InitOptions::~InitOptions ( )
virtual

Member Function Documentation

◆ auto_initialize_logging() [1/2]

bool rclcpp::InitOptions::auto_initialize_logging ( ) const

Return true if logging should be initialized when rclcpp::Context::init is called.

◆ auto_initialize_logging() [2/2]

InitOptions& rclcpp::InitOptions::auto_initialize_logging ( bool  initialize_logging)

Set flag indicating if logging should be initialized or not.

◆ operator=()

InitOptions& rclcpp::InitOptions::operator= ( const InitOptions other)

Assignment operator.

◆ get_rcl_init_options()

const rcl_init_options_t* rclcpp::InitOptions::get_rcl_init_options ( ) const

Return the rcl init options.

Returns
the rcl init options.
Exceptions
anythingrclcpp::exceptions::throw_from_rcl_error can throw.

◆ finalize_init_options()

void rclcpp::InitOptions::finalize_init_options ( )
protected

Member Data Documentation

◆ shutdown_on_sigint

bool rclcpp::InitOptions::shutdown_on_sigint = true

If true, the context will be shutdown on SIGINT by the signal handler (if it was installed).


The documentation for this class was generated from the following file: