removed extra semi-colon (#253)
* removed extra semi-colon * added -Wpedantic flag for GCC * added same warnings for clang * simplified CMake command
This commit is contained in:
parent
aa2d0a3954
commit
a987f8d015
27 changed files with 58 additions and 58 deletions
|
@ -10,8 +10,8 @@ find_package(rmw_implementation REQUIRED)
|
||||||
find_package(rmw_implementation_cmake REQUIRED)
|
find_package(rmw_implementation_cmake REQUIRED)
|
||||||
find_package(rosidl_generator_cpp REQUIRED)
|
find_package(rosidl_generator_cpp REQUIRED)
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
|
add_compile_options(-std=c++11 -Wall -Wextra -Wpedantic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace executor
|
||||||
|
|
||||||
struct AnyExecutable
|
struct AnyExecutable
|
||||||
{
|
{
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(AnyExecutable);
|
RCLCPP_SMART_PTR_DEFINITIONS(AnyExecutable)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
AnyExecutable();
|
AnyExecutable();
|
||||||
|
|
|
@ -49,7 +49,7 @@ class CallbackGroup
|
||||||
friend class rclcpp::node::Node;
|
friend class rclcpp::node::Node;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(CallbackGroup);
|
RCLCPP_SMART_PTR_DEFINITIONS(CallbackGroup)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
explicit CallbackGroup(CallbackGroupType group_type);
|
explicit CallbackGroup(CallbackGroupType group_type);
|
||||||
|
@ -79,7 +79,7 @@ public:
|
||||||
type() const;
|
type() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(CallbackGroup);
|
RCLCPP_DISABLE_COPY(CallbackGroup)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
void
|
void
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace client
|
||||||
class ClientBase
|
class ClientBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(ClientBase);
|
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(ClientBase)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
ClientBase(
|
ClientBase(
|
||||||
|
@ -88,7 +88,7 @@ public:
|
||||||
std::shared_ptr<rmw_request_id_t> request_header, std::shared_ptr<void> response) = 0;
|
std::shared_ptr<rmw_request_id_t> request_header, std::shared_ptr<void> response) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RCLCPP_DISABLE_COPY(ClientBase);
|
RCLCPP_DISABLE_COPY(ClientBase)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
bool
|
bool
|
||||||
|
@ -124,7 +124,7 @@ public:
|
||||||
using CallbackType = std::function<void(SharedFuture)>;
|
using CallbackType = std::function<void(SharedFuture)>;
|
||||||
using CallbackWithRequestType = std::function<void(SharedFutureWithRequest)>;
|
using CallbackWithRequestType = std::function<void(SharedFutureWithRequest)>;
|
||||||
|
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(Client);
|
RCLCPP_SMART_PTR_DEFINITIONS(Client)
|
||||||
|
|
||||||
Client(
|
Client(
|
||||||
std::shared_ptr<rclcpp::node::Node> parent_node,
|
std::shared_ptr<rclcpp::node::Node> parent_node,
|
||||||
|
@ -250,7 +250,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(Client);
|
RCLCPP_DISABLE_COPY(Client)
|
||||||
|
|
||||||
std::map<int64_t, std::tuple<SharedPromise, CallbackType, SharedFuture>> pending_requests_;
|
std::map<int64_t, std::tuple<SharedPromise, CallbackType, SharedFuture>> pending_requests_;
|
||||||
std::mutex pending_requests_mutex_;
|
std::mutex pending_requests_mutex_;
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace context
|
||||||
class Context
|
class Context
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(Context);
|
RCLCPP_SMART_PTR_DEFINITIONS(Context)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
Context();
|
Context();
|
||||||
|
@ -68,7 +68,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(Context);
|
RCLCPP_DISABLE_COPY(Context)
|
||||||
|
|
||||||
std::unordered_map<std::type_index, std::shared_ptr<void>> sub_contexts_;
|
std::unordered_map<std::type_index, std::shared_ptr<void>> sub_contexts_;
|
||||||
std::mutex mutex_;
|
std::mutex mutex_;
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace default_context
|
||||||
class DefaultContext : public rclcpp::context::Context
|
class DefaultContext : public rclcpp::context::Context
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(DefaultContext);
|
RCLCPP_SMART_PTR_DEFINITIONS(DefaultContext)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
DefaultContext();
|
DefaultContext();
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace event
|
||||||
class Event
|
class Event
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(Event);
|
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(Event)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
Event();
|
Event();
|
||||||
|
@ -47,7 +47,7 @@ public:
|
||||||
check_and_clear();
|
check_and_clear();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(Event);
|
RCLCPP_DISABLE_COPY(Event)
|
||||||
|
|
||||||
std::atomic_bool state_;
|
std::atomic_bool state_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -88,7 +88,7 @@ static inline ExecutorArgs create_default_executor_arguments()
|
||||||
class Executor
|
class Executor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(Executor);
|
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(Executor)
|
||||||
|
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
// \param[in] ms The memory strategy to be used with this executor.
|
// \param[in] ms The memory strategy to be used with this executor.
|
||||||
|
@ -316,7 +316,7 @@ protected:
|
||||||
memory_strategy::MemoryStrategy::SharedPtr memory_strategy_;
|
memory_strategy::MemoryStrategy::SharedPtr memory_strategy_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(Executor);
|
RCLCPP_DISABLE_COPY(Executor)
|
||||||
|
|
||||||
std::vector<std::weak_ptr<rclcpp::node::Node>> weak_nodes_;
|
std::vector<std::weak_ptr<rclcpp::node::Node>> weak_nodes_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace multi_threaded_executor
|
||||||
class MultiThreadedExecutor : public executor::Executor
|
class MultiThreadedExecutor : public executor::Executor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(MultiThreadedExecutor);
|
RCLCPP_SMART_PTR_DEFINITIONS(MultiThreadedExecutor)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
MultiThreadedExecutor(
|
MultiThreadedExecutor(
|
||||||
|
@ -57,7 +57,7 @@ protected:
|
||||||
run(size_t this_thread_number);
|
run(size_t this_thread_number);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(MultiThreadedExecutor);
|
RCLCPP_DISABLE_COPY(MultiThreadedExecutor)
|
||||||
|
|
||||||
std::mutex wait_mutex_;
|
std::mutex wait_mutex_;
|
||||||
size_t number_of_threads_;
|
size_t number_of_threads_;
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace single_threaded_executor
|
||||||
class SingleThreadedExecutor : public executor::Executor
|
class SingleThreadedExecutor : public executor::Executor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(SingleThreadedExecutor);
|
RCLCPP_SMART_PTR_DEFINITIONS(SingleThreadedExecutor)
|
||||||
|
|
||||||
/// Default constructor. See the default constructor for Executor.
|
/// Default constructor. See the default constructor for Executor.
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
|
@ -61,7 +61,7 @@ public:
|
||||||
spin();
|
spin();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(SingleThreadedExecutor);
|
RCLCPP_DISABLE_COPY(SingleThreadedExecutor)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace single_threaded_executor
|
} // namespace single_threaded_executor
|
||||||
|
|
|
@ -152,7 +152,7 @@ protected:
|
||||||
run_loop();
|
run_loop();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(GraphListener);
|
RCLCPP_DISABLE_COPY(GraphListener)
|
||||||
|
|
||||||
std::thread listener_thread_;
|
std::thread listener_thread_;
|
||||||
bool is_started_;
|
bool is_started_;
|
||||||
|
|
|
@ -120,10 +120,10 @@ namespace intra_process_manager
|
||||||
class IntraProcessManager
|
class IntraProcessManager
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(IntraProcessManager);
|
RCLCPP_DISABLE_COPY(IntraProcessManager)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(IntraProcessManager);
|
RCLCPP_SMART_PTR_DEFINITIONS(IntraProcessManager)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
explicit IntraProcessManager(
|
explicit IntraProcessManager(
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace intra_process_manager
|
||||||
class IntraProcessManagerImplBase
|
class IntraProcessManagerImplBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(IntraProcessManagerImplBase);
|
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(IntraProcessManagerImplBase)
|
||||||
|
|
||||||
IntraProcessManagerImplBase() = default;
|
IntraProcessManagerImplBase() = default;
|
||||||
~IntraProcessManagerImplBase() = default;
|
~IntraProcessManagerImplBase() = default;
|
||||||
|
@ -78,7 +78,7 @@ public:
|
||||||
matches_any_publishers(const rmw_gid_t * id) const = 0;
|
matches_any_publishers(const rmw_gid_t * id) const = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(IntraProcessManagerImplBase);
|
RCLCPP_DISABLE_COPY(IntraProcessManagerImplBase)
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Allocator = std::allocator<void>>
|
template<typename Allocator = std::allocator<void>>
|
||||||
|
@ -242,7 +242,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(IntraProcessManagerImpl);
|
RCLCPP_DISABLE_COPY(IntraProcessManagerImpl)
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
using RebindAlloc = typename std::allocator_traits<Allocator>::template rebind_alloc<T>;
|
using RebindAlloc = typename std::allocator_traits<Allocator>::template rebind_alloc<T>;
|
||||||
|
@ -262,7 +262,7 @@ private:
|
||||||
|
|
||||||
struct PublisherInfo
|
struct PublisherInfo
|
||||||
{
|
{
|
||||||
RCLCPP_DISABLE_COPY(PublisherInfo);
|
RCLCPP_DISABLE_COPY(PublisherInfo)
|
||||||
|
|
||||||
PublisherInfo() = default;
|
PublisherInfo() = default;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace mapped_ring_buffer
|
||||||
class RCLCPP_PUBLIC MappedRingBufferBase
|
class RCLCPP_PUBLIC MappedRingBufferBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(MappedRingBufferBase);
|
RCLCPP_SMART_PTR_DEFINITIONS(MappedRingBufferBase)
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Ring buffer container of unique_ptr's of T, which can be accessed by a key.
|
/// Ring buffer container of unique_ptr's of T, which can be accessed by a key.
|
||||||
|
@ -58,7 +58,7 @@ template<typename T, typename Alloc = std::allocator<void>>
|
||||||
class MappedRingBuffer : public MappedRingBufferBase
|
class MappedRingBuffer : public MappedRingBufferBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(MappedRingBuffer<T, Alloc>);
|
RCLCPP_SMART_PTR_DEFINITIONS(MappedRingBuffer<T, Alloc>)
|
||||||
using ElemAllocTraits = allocator::AllocRebind<T, Alloc>;
|
using ElemAllocTraits = allocator::AllocRebind<T, Alloc>;
|
||||||
using ElemAlloc = typename ElemAllocTraits::allocator_type;
|
using ElemAlloc = typename ElemAllocTraits::allocator_type;
|
||||||
using ElemDeleter = allocator::Deleter<ElemAlloc, T>;
|
using ElemDeleter = allocator::Deleter<ElemAlloc, T>;
|
||||||
|
@ -207,7 +207,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(MappedRingBuffer<T, Alloc>);
|
RCLCPP_DISABLE_COPY(MappedRingBuffer<T, Alloc>)
|
||||||
|
|
||||||
struct element
|
struct element
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace memory_strategy
|
||||||
class RCLCPP_PUBLIC MemoryStrategy
|
class RCLCPP_PUBLIC MemoryStrategy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(MemoryStrategy);
|
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(MemoryStrategy)
|
||||||
using WeakNodeVector = std::vector<std::weak_ptr<rclcpp::node::Node>>;
|
using WeakNodeVector = std::vector<std::weak_ptr<rclcpp::node::Node>>;
|
||||||
|
|
||||||
virtual bool collect_entities(const WeakNodeVector & weak_nodes) = 0;
|
virtual bool collect_entities(const WeakNodeVector & weak_nodes) = 0;
|
||||||
|
|
|
@ -33,7 +33,7 @@ template<typename MessageT, typename Alloc = std::allocator<void>>
|
||||||
class MessageMemoryStrategy
|
class MessageMemoryStrategy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(MessageMemoryStrategy);
|
RCLCPP_SMART_PTR_DEFINITIONS(MessageMemoryStrategy)
|
||||||
|
|
||||||
using MessageAllocTraits = allocator::AllocRebind<MessageT, Alloc>;
|
using MessageAllocTraits = allocator::AllocRebind<MessageT, Alloc>;
|
||||||
using MessageAlloc = typename MessageAllocTraits::allocator_type;
|
using MessageAlloc = typename MessageAllocTraits::allocator_type;
|
||||||
|
|
|
@ -80,7 +80,7 @@ public:
|
||||||
class Node : public std::enable_shared_from_this<Node>
|
class Node : public std::enable_shared_from_this<Node>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(Node);
|
RCLCPP_SMART_PTR_DEFINITIONS(Node)
|
||||||
|
|
||||||
/// Create a new node with the specified name.
|
/// Create a new node with the specified name.
|
||||||
/**
|
/**
|
||||||
|
@ -380,7 +380,7 @@ public:
|
||||||
std::atomic_bool has_executor;
|
std::atomic_bool has_executor;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(Node);
|
RCLCPP_DISABLE_COPY(Node)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace parameter_client
|
||||||
class AsyncParametersClient
|
class AsyncParametersClient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(AsyncParametersClient);
|
RCLCPP_SMART_PTR_DEFINITIONS(AsyncParametersClient)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
AsyncParametersClient(
|
AsyncParametersClient(
|
||||||
|
@ -118,7 +118,7 @@ private:
|
||||||
class SyncParametersClient
|
class SyncParametersClient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(SyncParametersClient);
|
RCLCPP_SMART_PTR_DEFINITIONS(SyncParametersClient)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
explicit SyncParametersClient(
|
explicit SyncParametersClient(
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace parameter_service
|
||||||
class ParameterService
|
class ParameterService
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(ParameterService);
|
RCLCPP_SMART_PTR_DEFINITIONS(ParameterService)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
explicit ParameterService(
|
explicit ParameterService(
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace publisher
|
||||||
class PublisherBase
|
class PublisherBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(PublisherBase);
|
RCLCPP_SMART_PTR_DEFINITIONS(PublisherBase)
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
/**
|
/**
|
||||||
* Typically, a publisher is not created through this method, but instead is created through a
|
* Typically, a publisher is not created through this method, but instead is created through a
|
||||||
|
@ -151,7 +151,7 @@ public:
|
||||||
using MessageDeleter = allocator::Deleter<MessageAlloc, MessageT>;
|
using MessageDeleter = allocator::Deleter<MessageAlloc, MessageT>;
|
||||||
using MessageUniquePtr = std::unique_ptr<MessageT, MessageDeleter>;
|
using MessageUniquePtr = std::unique_ptr<MessageT, MessageDeleter>;
|
||||||
|
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(Publisher<MessageT, Alloc>);
|
RCLCPP_SMART_PTR_DEFINITIONS(Publisher<MessageT, Alloc>)
|
||||||
|
|
||||||
Publisher(
|
Publisher(
|
||||||
std::shared_ptr<rcl_node_t> node_handle,
|
std::shared_ptr<rcl_node_t> node_handle,
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace rate
|
||||||
class RateBase
|
class RateBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(RateBase);
|
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(RateBase)
|
||||||
|
|
||||||
virtual bool sleep() = 0;
|
virtual bool sleep() = 0;
|
||||||
virtual bool is_steady() const = 0;
|
virtual bool is_steady() const = 0;
|
||||||
|
@ -46,7 +46,7 @@ template<class Clock = std::chrono::high_resolution_clock>
|
||||||
class GenericRate : public RateBase
|
class GenericRate : public RateBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(GenericRate);
|
RCLCPP_SMART_PTR_DEFINITIONS(GenericRate)
|
||||||
|
|
||||||
explicit GenericRate(double rate)
|
explicit GenericRate(double rate)
|
||||||
: GenericRate<Clock>(
|
: GenericRate<Clock>(
|
||||||
|
@ -106,7 +106,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(GenericRate);
|
RCLCPP_DISABLE_COPY(GenericRate)
|
||||||
|
|
||||||
std::chrono::nanoseconds period_;
|
std::chrono::nanoseconds period_;
|
||||||
using ClockDurationNano = std::chrono::duration<typename Clock::rep, std::nano>;
|
using ClockDurationNano = std::chrono::duration<typename Clock::rep, std::nano>;
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace service
|
||||||
class ServiceBase
|
class ServiceBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(ServiceBase);
|
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(ServiceBase)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
ServiceBase(
|
ServiceBase(
|
||||||
|
@ -64,7 +64,7 @@ public:
|
||||||
std::shared_ptr<void> request) = 0;
|
std::shared_ptr<void> request) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RCLCPP_DISABLE_COPY(ServiceBase);
|
RCLCPP_DISABLE_COPY(ServiceBase)
|
||||||
|
|
||||||
std::shared_ptr<rcl_node_t> node_handle_;
|
std::shared_ptr<rcl_node_t> node_handle_;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public:
|
||||||
const std::shared_ptr<rmw_request_id_t>,
|
const std::shared_ptr<rmw_request_id_t>,
|
||||||
const std::shared_ptr<typename ServiceT::Request>,
|
const std::shared_ptr<typename ServiceT::Request>,
|
||||||
std::shared_ptr<typename ServiceT::Response>)>;
|
std::shared_ptr<typename ServiceT::Response>)>;
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(Service);
|
RCLCPP_SMART_PTR_DEFINITIONS(Service)
|
||||||
|
|
||||||
Service(
|
Service(
|
||||||
std::shared_ptr<rcl_node_t> node_handle,
|
std::shared_ptr<rcl_node_t> node_handle,
|
||||||
|
@ -158,7 +158,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(Service);
|
RCLCPP_DISABLE_COPY(Service)
|
||||||
|
|
||||||
AnyServiceCallback<ServiceT> any_callback_;
|
AnyServiceCallback<ServiceT> any_callback_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -44,7 +44,7 @@ template<typename Alloc = std::allocator<void>>
|
||||||
class AllocatorMemoryStrategy : public memory_strategy::MemoryStrategy
|
class AllocatorMemoryStrategy : public memory_strategy::MemoryStrategy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(AllocatorMemoryStrategy<Alloc>);
|
RCLCPP_SMART_PTR_DEFINITIONS(AllocatorMemoryStrategy<Alloc>)
|
||||||
|
|
||||||
using ExecAllocTraits = allocator::AllocRebind<executor::AnyExecutable, Alloc>;
|
using ExecAllocTraits = allocator::AllocRebind<executor::AnyExecutable, Alloc>;
|
||||||
using ExecAlloc = typename ExecAllocTraits::allocator_type;
|
using ExecAlloc = typename ExecAllocTraits::allocator_type;
|
||||||
|
|
|
@ -46,7 +46,7 @@ class MessagePoolMemoryStrategy
|
||||||
: public message_memory_strategy::MessageMemoryStrategy<MessageT>
|
: public message_memory_strategy::MessageMemoryStrategy<MessageT>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(MessagePoolMemoryStrategy);
|
RCLCPP_SMART_PTR_DEFINITIONS(MessagePoolMemoryStrategy)
|
||||||
|
|
||||||
/// Default constructor
|
/// Default constructor
|
||||||
MessagePoolMemoryStrategy()
|
MessagePoolMemoryStrategy()
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace subscription
|
||||||
class SubscriptionBase
|
class SubscriptionBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(SubscriptionBase);
|
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(SubscriptionBase)
|
||||||
|
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
/**
|
/**
|
||||||
|
@ -109,7 +109,7 @@ protected:
|
||||||
std::shared_ptr<rcl_node_t> node_handle_;
|
std::shared_ptr<rcl_node_t> node_handle_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RCLCPP_DISABLE_COPY(SubscriptionBase);
|
RCLCPP_DISABLE_COPY(SubscriptionBase)
|
||||||
std::string topic_name_;
|
std::string topic_name_;
|
||||||
bool ignore_local_publications_;
|
bool ignore_local_publications_;
|
||||||
};
|
};
|
||||||
|
@ -128,7 +128,7 @@ public:
|
||||||
using MessageDeleter = allocator::Deleter<MessageAlloc, MessageT>;
|
using MessageDeleter = allocator::Deleter<MessageAlloc, MessageT>;
|
||||||
using MessageUniquePtr = std::unique_ptr<MessageT, MessageDeleter>;
|
using MessageUniquePtr = std::unique_ptr<MessageT, MessageDeleter>;
|
||||||
|
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(Subscription);
|
RCLCPP_SMART_PTR_DEFINITIONS(Subscription)
|
||||||
|
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
/**
|
/**
|
||||||
|
@ -271,7 +271,7 @@ private:
|
||||||
return &intra_process_subscription_handle_;
|
return &intra_process_subscription_handle_;
|
||||||
}
|
}
|
||||||
|
|
||||||
RCLCPP_DISABLE_COPY(Subscription);
|
RCLCPP_DISABLE_COPY(Subscription)
|
||||||
|
|
||||||
AnySubscriptionCallback<MessageT, Alloc> any_callback_;
|
AnySubscriptionCallback<MessageT, Alloc> any_callback_;
|
||||||
typename message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr
|
typename message_memory_strategy::MessageMemoryStrategy<MessageT, Alloc>::SharedPtr
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace timer
|
||||||
class TimerBase
|
class TimerBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(TimerBase);
|
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(TimerBase)
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
explicit TimerBase(std::chrono::nanoseconds period);
|
explicit TimerBase(std::chrono::nanoseconds period);
|
||||||
|
@ -103,7 +103,7 @@ template<
|
||||||
class GenericTimer : public TimerBase
|
class GenericTimer : public TimerBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(GenericTimer);
|
RCLCPP_SMART_PTR_DEFINITIONS(GenericTimer)
|
||||||
|
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
/**
|
/**
|
||||||
|
@ -170,7 +170,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RCLCPP_DISABLE_COPY(GenericTimer);
|
RCLCPP_DISABLE_COPY(GenericTimer)
|
||||||
|
|
||||||
FunctorT callback_;
|
FunctorT callback_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace mock
|
||||||
class PublisherBase
|
class PublisherBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(PublisherBase);
|
RCLCPP_SMART_PTR_DEFINITIONS(PublisherBase)
|
||||||
|
|
||||||
PublisherBase()
|
PublisherBase()
|
||||||
: mock_topic_name(""), mock_queue_size(0) {}
|
: mock_topic_name(""), mock_queue_size(0) {}
|
||||||
|
@ -66,7 +66,7 @@ public:
|
||||||
using MessageUniquePtr = std::unique_ptr<T, MessageDeleter>;
|
using MessageUniquePtr = std::unique_ptr<T, MessageDeleter>;
|
||||||
std::shared_ptr<MessageAlloc> allocator_;
|
std::shared_ptr<MessageAlloc> allocator_;
|
||||||
|
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(Publisher<T, Alloc>);
|
RCLCPP_SMART_PTR_DEFINITIONS(Publisher<T, Alloc>)
|
||||||
|
|
||||||
Publisher()
|
Publisher()
|
||||||
{
|
{
|
||||||
|
@ -93,7 +93,7 @@ namespace mock
|
||||||
class SubscriptionBase
|
class SubscriptionBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RCLCPP_SMART_PTR_DEFINITIONS(SubscriptionBase);
|
RCLCPP_SMART_PTR_DEFINITIONS(SubscriptionBase)
|
||||||
|
|
||||||
SubscriptionBase()
|
SubscriptionBase()
|
||||||
: mock_topic_name(""), mock_queue_size(0) {}
|
: mock_topic_name(""), mock_queue_size(0) {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue