Merge pull request #897 from monidzik/upstream-apex-changes

Removing "virtual", adding "override" keywords in the package
This commit is contained in:
Claire Wang 2019-12-02 14:22:25 -08:00 committed by GitHub
commit e2efb76477
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 103 additions and 103 deletions

View file

@ -62,7 +62,7 @@ public:
RCLCPP_PUBLIC
void
spin();
spin() override;
RCLCPP_PUBLIC
size_t

View file

@ -56,7 +56,7 @@ public:
// 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)

View file

@ -50,89 +50,89 @@ public:
~NodeBase();
RCLCPP_PUBLIC
virtual
const char *
get_name() const;
get_name() const override;
RCLCPP_PUBLIC
virtual
const char *
get_namespace() const;
get_namespace() const override;
RCLCPP_PUBLIC
virtual
const char *
get_fully_qualified_name() const;
get_fully_qualified_name() const override;
RCLCPP_PUBLIC
virtual
rclcpp::Context::SharedPtr
get_context();
get_context() override;
RCLCPP_PUBLIC
virtual
rcl_node_t *
get_rcl_node_handle();
get_rcl_node_handle() override;
RCLCPP_PUBLIC
virtual
const rcl_node_t *
get_rcl_node_handle() const;
get_rcl_node_handle() const override;
RCLCPP_PUBLIC
virtual
std::shared_ptr<rcl_node_t>
get_shared_rcl_node_handle();
get_shared_rcl_node_handle() override;
RCLCPP_PUBLIC
virtual
std::shared_ptr<const rcl_node_t>
get_shared_rcl_node_handle() const;
get_shared_rcl_node_handle() const override;
RCLCPP_PUBLIC
virtual
bool
assert_liveliness() const;
assert_liveliness() const override;
RCLCPP_PUBLIC
virtual
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
virtual
rclcpp::callback_group::CallbackGroup::SharedPtr
get_default_callback_group();
get_default_callback_group() override;
RCLCPP_PUBLIC
virtual
bool
callback_group_in_node(rclcpp::callback_group::CallbackGroup::SharedPtr group);
callback_group_in_node(rclcpp::callback_group::CallbackGroup::SharedPtr group) override;
RCLCPP_PUBLIC
virtual
const std::vector<rclcpp::callback_group::CallbackGroup::WeakPtr> &
get_callback_groups() const;
get_callback_groups() const override;
RCLCPP_PUBLIC
virtual
std::atomic_bool &
get_associated_with_executor_atomic();
get_associated_with_executor_atomic() override;
RCLCPP_PUBLIC
virtual
rcl_guard_condition_t *
get_notify_guard_condition();
get_notify_guard_condition() override;
RCLCPP_PUBLIC
virtual
std::unique_lock<std::recursive_mutex>
acquire_notify_guard_condition_lock() const;
acquire_notify_guard_condition_lock() const override;
RCLCPP_PUBLIC
virtual
bool
get_use_intra_process_default() const;
get_use_intra_process_default() const override;
private:
RCLCPP_DISABLE_COPY(NodeBase)

View file

@ -50,9 +50,9 @@ public:
/// Get a clock which will be kept up to date by the node.
RCLCPP_PUBLIC
virtual
rclcpp::Clock::SharedPtr
get_clock();
get_clock() override;
private:
RCLCPP_DISABLE_COPY(NodeClock)

View file

@ -56,66 +56,66 @@ public:
~NodeGraph();
RCLCPP_PUBLIC
virtual
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
virtual
std::map<std::string, std::vector<std::string>>
get_service_names_and_types() const;
get_service_names_and_types() const override;
RCLCPP_PUBLIC
virtual
std::vector<std::string>
get_node_names() const;
get_node_names() const override;
RCLCPP_PUBLIC
virtual
std::vector<std::pair<std::string, std::string>>
get_node_names_and_namespaces() const;
get_node_names_and_namespaces() const override;
RCLCPP_PUBLIC
virtual
size_t
count_publishers(const std::string & topic_name) const;
count_publishers(const std::string & topic_name) const override;
RCLCPP_PUBLIC
virtual
size_t
count_subscribers(const std::string & topic_name) const;
count_subscribers(const std::string & topic_name) const override;
RCLCPP_PUBLIC
virtual
const rcl_guard_condition_t *
get_graph_guard_condition() const;
get_graph_guard_condition() const override;
RCLCPP_PUBLIC
virtual
void
notify_graph_change();
notify_graph_change() override;
RCLCPP_PUBLIC
virtual
void
notify_shutdown();
notify_shutdown() override;
RCLCPP_PUBLIC
virtual
rclcpp::Event::SharedPtr
get_graph_event();
get_graph_event() override;
RCLCPP_PUBLIC
virtual
void
wait_for_graph_change(
rclcpp::Event::SharedPtr event,
std::chrono::nanoseconds timeout);
std::chrono::nanoseconds timeout) override;
RCLCPP_PUBLIC
virtual
size_t
count_graph_users();
count_graph_users() override;
private:
RCLCPP_DISABLE_COPY(NodeGraph)

View file

@ -42,14 +42,14 @@ public:
~NodeLogging();
RCLCPP_PUBLIC
virtual
rclcpp::Logger
get_logger() const;
get_logger() const override;
RCLCPP_PUBLIC
virtual
const char *
get_logger_name() const;
get_logger_name() const override;
private:
RCLCPP_DISABLE_COPY(NodeLogging)

View file

@ -42,18 +42,18 @@ public:
~NodeServices();
RCLCPP_PUBLIC
virtual
void
add_client(
rclcpp::ClientBase::SharedPtr client_base_ptr,
rclcpp::callback_group::CallbackGroup::SharedPtr group);
rclcpp::callback_group::CallbackGroup::SharedPtr group) override;
RCLCPP_PUBLIC
virtual
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)

View file

@ -42,11 +42,11 @@ public:
/// Add a timer to the node.
RCLCPP_PUBLIC
virtual
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)

View file

@ -42,18 +42,18 @@ public:
~NodeWaitables();
RCLCPP_PUBLIC
virtual
void
add_waitable(
rclcpp::Waitable::SharedPtr waitable_base_ptr,
rclcpp::callback_group::CallbackGroup::SharedPtr group);
rclcpp::callback_group::CallbackGroup::SharedPtr group) override;
RCLCPP_PUBLIC
virtual
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)

View file

@ -213,12 +213,12 @@ public:
{
}
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)
@ -227,7 +227,7 @@ public:
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);

View file

@ -61,7 +61,7 @@ public:
allocator_ = std::make_shared<VoidAlloc>();
}
void add_guard_condition(const rcl_guard_condition_t * guard_condition)
void add_guard_condition(const rcl_guard_condition_t * guard_condition) override
{
for (const auto & existing_guard_condition : guard_conditions_) {
if (existing_guard_condition == guard_condition) {
@ -71,7 +71,7 @@ public:
guard_conditions_.push_back(guard_condition);
}
void remove_guard_condition(const rcl_guard_condition_t * guard_condition)
void remove_guard_condition(const rcl_guard_condition_t * guard_condition) override
{
for (auto it = guard_conditions_.begin(); it != guard_conditions_.end(); ++it) {
if (*it == guard_condition) {
@ -81,7 +81,7 @@ public:
}
}
void clear_handles()
void clear_handles() override
{
subscription_handles_.clear();
service_handles_.clear();
@ -90,7 +90,7 @@ public:
waitable_handles_.clear();
}
virtual void remove_null_handles(rcl_wait_set_t * wait_set)
void remove_null_handles(rcl_wait_set_t * wait_set) override
{
// TODO(jacobperron): Check if wait set sizes are what we expect them to be?
// e.g. wait_set->size_of_clients == client_handles_.size()
@ -150,7 +150,7 @@ public:
);
}
bool collect_entities(const WeakNodeList & weak_nodes)
bool collect_entities(const WeakNodeList & weak_nodes) override
{
bool has_invalid_weak_nodes = false;
for (auto & weak_node : weak_nodes) {
@ -191,7 +191,7 @@ public:
return has_invalid_weak_nodes;
}
bool add_handles_to_wait_set(rcl_wait_set_t * wait_set)
bool add_handles_to_wait_set(rcl_wait_set_t * wait_set) override
{
for (auto subscription : subscription_handles_) {
if (rcl_wait_set_add_subscription(wait_set, subscription.get(), NULL) != RCL_RET_OK) {
@ -250,10 +250,10 @@ public:
return true;
}
virtual void
void
get_next_subscription(
executor::AnyExecutable & any_exec,
const WeakNodeList & weak_nodes)
const WeakNodeList & weak_nodes) override
{
auto it = subscription_handles_.begin();
while (it != subscription_handles_.end()) {
@ -285,10 +285,10 @@ public:
}
}
virtual void
void
get_next_service(
executor::AnyExecutable & any_exec,
const WeakNodeList & weak_nodes)
const WeakNodeList & weak_nodes) override
{
auto it = service_handles_.begin();
while (it != service_handles_.end()) {
@ -320,8 +320,8 @@ public:
}
}
virtual void
get_next_client(executor::AnyExecutable & any_exec, const WeakNodeList & weak_nodes)
void
get_next_client(executor::AnyExecutable & any_exec, const WeakNodeList & weak_nodes) override
{
auto it = client_handles_.begin();
while (it != client_handles_.end()) {
@ -353,10 +353,10 @@ public:
}
}
virtual void
void
get_next_timer(
executor::AnyExecutable & any_exec,
const WeakNodeList & weak_nodes)
const WeakNodeList & weak_nodes) override
{
auto it = timer_handles_.begin();
while (it != timer_handles_.end()) {
@ -388,8 +388,8 @@ public:
}
}
virtual void
get_next_waitable(executor::AnyExecutable & any_exec, const WeakNodeList & weak_nodes)
void
get_next_waitable(executor::AnyExecutable & any_exec, const WeakNodeList & weak_nodes) override
{
auto it = waitable_handles_.begin();
while (it != waitable_handles_.end()) {
@ -421,12 +421,12 @@ public:
}
}
virtual rcl_allocator_t get_allocator()
rcl_allocator_t get_allocator() override
{
return rclcpp::allocator::get_rcl_allocator<void *, VoidAlloc>(*allocator_.get());
}
size_t number_of_ready_subscriptions() const
size_t number_of_ready_subscriptions() const override
{
size_t number_of_subscriptions = subscription_handles_.size();
for (auto waitable : waitable_handles_) {
@ -435,7 +435,7 @@ public:
return number_of_subscriptions;
}
size_t number_of_ready_services() const
size_t number_of_ready_services() const override
{
size_t number_of_services = service_handles_.size();
for (auto waitable : waitable_handles_) {
@ -444,7 +444,7 @@ public:
return number_of_services;
}
size_t number_of_ready_events() const
size_t number_of_ready_events() const override
{
size_t number_of_events = 0;
for (auto waitable : waitable_handles_) {
@ -453,7 +453,7 @@ public:
return number_of_events;
}
size_t number_of_ready_clients() const
size_t number_of_ready_clients() const override
{
size_t number_of_clients = client_handles_.size();
for (auto waitable : waitable_handles_) {
@ -462,7 +462,7 @@ public:
return number_of_clients;
}
size_t number_of_guard_conditions() const
size_t number_of_guard_conditions() const override
{
size_t number_of_guard_conditions = guard_conditions_.size();
for (auto waitable : waitable_handles_) {
@ -471,7 +471,7 @@ public:
return number_of_guard_conditions;
}
size_t number_of_ready_timers() const
size_t number_of_ready_timers() const override
{
size_t number_of_timers = timer_handles_.size();
for (auto waitable : waitable_handles_) {
@ -480,7 +480,7 @@ public:
return number_of_timers;
}
size_t number_of_waitables() const
size_t number_of_waitables() const override
{
return waitable_handles_.size();
}