Skip to content

Commit

Permalink
Add override keyword to functions
Browse files Browse the repository at this point in the history
Signed-off-by: Monika Idzik <monika.idzik@apex.ai>
  • Loading branch information
Monika Idzik committed Nov 22, 2019
1 parent ef52953 commit c024189
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MultiThreadedExecutor : public executor::Executor

RCLCPP_PUBLIC
void
spin();
spin() override;

RCLCPP_PUBLIC
size_t
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class SingleThreadedExecutor : public executor::Executor
// It will only be interrupt by a CTRL-C (managed by the global signal handler).
RCLCPP_PUBLIC
void
spin();
spin() override;

private:
RCLCPP_DISABLE_COPY(SingleThreadedExecutor)
Expand Down
34 changes: 17 additions & 17 deletions rclcpp/include/rclcpp/node_interfaces/node_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,87 +52,87 @@ class NodeBase : public NodeBaseInterface
RCLCPP_PUBLIC

const char *
get_name() const;
get_name() const override;

RCLCPP_PUBLIC

const char *
get_namespace() const;
get_namespace() const override;

RCLCPP_PUBLIC

const char *
get_fully_qualified_name() const;
get_fully_qualified_name() const override;

RCLCPP_PUBLIC

rclcpp::Context::SharedPtr
get_context();
get_context() override;

RCLCPP_PUBLIC

rcl_node_t *
get_rcl_node_handle();
get_rcl_node_handle() override;

RCLCPP_PUBLIC

const rcl_node_t *
get_rcl_node_handle() const;
get_rcl_node_handle() const override;

RCLCPP_PUBLIC

std::shared_ptr<rcl_node_t>
get_shared_rcl_node_handle();
get_shared_rcl_node_handle() override;

RCLCPP_PUBLIC

std::shared_ptr<const rcl_node_t>
get_shared_rcl_node_handle() const;
get_shared_rcl_node_handle() const override;

RCLCPP_PUBLIC

bool
assert_liveliness() const;
assert_liveliness() const override;

RCLCPP_PUBLIC

rclcpp::callback_group::CallbackGroup::SharedPtr
create_callback_group(rclcpp::callback_group::CallbackGroupType group_type);
create_callback_group(rclcpp::callback_group::CallbackGroupType group_type) override;

RCLCPP_PUBLIC

rclcpp::callback_group::CallbackGroup::SharedPtr
get_default_callback_group();
get_default_callback_group() override;

RCLCPP_PUBLIC

bool
callback_group_in_node(rclcpp::callback_group::CallbackGroup::SharedPtr group);
callback_group_in_node(rclcpp::callback_group::CallbackGroup::SharedPtr group) override;

RCLCPP_PUBLIC

const std::vector<rclcpp::callback_group::CallbackGroup::WeakPtr> &
get_callback_groups() const;
get_callback_groups() const override;

RCLCPP_PUBLIC

std::atomic_bool &
get_associated_with_executor_atomic();
get_associated_with_executor_atomic() override;

RCLCPP_PUBLIC

rcl_guard_condition_t *
get_notify_guard_condition();
get_notify_guard_condition() override;

RCLCPP_PUBLIC

std::unique_lock<std::recursive_mutex>
acquire_notify_guard_condition_lock() const;
acquire_notify_guard_condition_lock() const override;

RCLCPP_PUBLIC

bool
get_use_intra_process_default() const;
get_use_intra_process_default() const override;

private:
RCLCPP_DISABLE_COPY(NodeBase)
Expand Down
2 changes: 1 addition & 1 deletion rclcpp/include/rclcpp/node_interfaces/node_clock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class NodeClock : public NodeClockInterface
RCLCPP_PUBLIC

rclcpp::Clock::SharedPtr
get_clock();
get_clock() override;

private:
RCLCPP_DISABLE_COPY(NodeClock)
Expand Down
24 changes: 12 additions & 12 deletions rclcpp/include/rclcpp/node_interfaces/node_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,64 +58,64 @@ class NodeGraph : public NodeGraphInterface
RCLCPP_PUBLIC

std::map<std::string, std::vector<std::string>>
get_topic_names_and_types(bool no_demangle = false) const;
get_topic_names_and_types(bool no_demangle = false) const override;

RCLCPP_PUBLIC

std::map<std::string, std::vector<std::string>>
get_service_names_and_types() const;
get_service_names_and_types() const override;

RCLCPP_PUBLIC

std::vector<std::string>
get_node_names() const;
get_node_names() const override;

RCLCPP_PUBLIC

std::vector<std::pair<std::string, std::string>>
get_node_names_and_namespaces() const;
get_node_names_and_namespaces() const override;

RCLCPP_PUBLIC

size_t
count_publishers(const std::string & topic_name) const;
count_publishers(const std::string & topic_name) const override;

RCLCPP_PUBLIC

size_t
count_subscribers(const std::string & topic_name) const;
count_subscribers(const std::string & topic_name) const override;

RCLCPP_PUBLIC

const rcl_guard_condition_t *
get_graph_guard_condition() const;
get_graph_guard_condition() const override;

RCLCPP_PUBLIC

void
notify_graph_change();
notify_graph_change() override;

RCLCPP_PUBLIC

void
notify_shutdown();
notify_shutdown() override;

RCLCPP_PUBLIC

rclcpp::Event::SharedPtr
get_graph_event();
get_graph_event() override;

RCLCPP_PUBLIC

void
wait_for_graph_change(
rclcpp::Event::SharedPtr event,
std::chrono::nanoseconds timeout);
std::chrono::nanoseconds timeout) override;

RCLCPP_PUBLIC

size_t
count_graph_users();
count_graph_users() override;

private:
RCLCPP_DISABLE_COPY(NodeGraph)
Expand Down
4 changes: 2 additions & 2 deletions rclcpp/include/rclcpp/node_interfaces/node_logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ class NodeLogging : public NodeLoggingInterface
RCLCPP_PUBLIC

rclcpp::Logger
get_logger() const;
get_logger() const override;

RCLCPP_PUBLIC

const char *
get_logger_name() const;
get_logger_name() const override;

private:
RCLCPP_DISABLE_COPY(NodeLogging)
Expand Down
4 changes: 2 additions & 2 deletions rclcpp/include/rclcpp/node_interfaces/node_services.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ class NodeServices : public NodeServicesInterface
void
add_client(
rclcpp::ClientBase::SharedPtr client_base_ptr,
rclcpp::callback_group::CallbackGroup::SharedPtr group);
rclcpp::callback_group::CallbackGroup::SharedPtr group) override;

RCLCPP_PUBLIC

void
add_service(
rclcpp::ServiceBase::SharedPtr service_base_ptr,
rclcpp::callback_group::CallbackGroup::SharedPtr group);
rclcpp::callback_group::CallbackGroup::SharedPtr group) override;

private:
RCLCPP_DISABLE_COPY(NodeServices)
Expand Down
2 changes: 1 addition & 1 deletion rclcpp/include/rclcpp/node_interfaces/node_timers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class NodeTimers : public NodeTimersInterface
void
add_timer(
rclcpp::TimerBase::SharedPtr timer,
rclcpp::callback_group::CallbackGroup::SharedPtr callback_group);
rclcpp::callback_group::CallbackGroup::SharedPtr callback_group) override;

private:
RCLCPP_DISABLE_COPY(NodeTimers)
Expand Down
4 changes: 2 additions & 2 deletions rclcpp/include/rclcpp/node_interfaces/node_waitables.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ class NodeWaitables : public NodeWaitablesInterface
void
add_waitable(
rclcpp::Waitable::SharedPtr waitable_base_ptr,
rclcpp::callback_group::CallbackGroup::SharedPtr group);
rclcpp::callback_group::CallbackGroup::SharedPtr group) override;

RCLCPP_PUBLIC

void
remove_waitable(
rclcpp::Waitable::SharedPtr waitable_ptr,
rclcpp::callback_group::CallbackGroup::SharedPtr group) noexcept;
rclcpp::callback_group::CallbackGroup::SharedPtr group) noexcept override;

private:
RCLCPP_DISABLE_COPY(NodeWaitables)
Expand Down
6 changes: 3 additions & 3 deletions rclcpp/include/rclcpp/service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ class Service : public ServiceBase
{
}

std::shared_ptr<void> create_request()
std::shared_ptr<void> create_request() override
{
return std::shared_ptr<void>(new typename ServiceT::Request());
}

std::shared_ptr<rmw_request_id_t> create_request_header()
std::shared_ptr<rmw_request_id_t> create_request_header() override
{
// TODO(wjwwood): This should probably use rmw_request_id's allocator.
// (since it is a C type)
Expand All @@ -227,7 +227,7 @@ class Service : public ServiceBase

void handle_request(
std::shared_ptr<rmw_request_id_t> request_header,
std::shared_ptr<void> request)
std::shared_ptr<void> request) override
{
auto typed_request = std::static_pointer_cast<typename ServiceT::Request>(request);
auto response = std::shared_ptr<typename ServiceT::Response>(new typename ServiceT::Response);
Expand Down
Loading

0 comments on commit c024189

Please sign in to comment.