rclcpp  master
C++ ROS Client Library API
Classes | Typedefs | Functions
rclcpp::allocator Namespace Reference

Classes

class  AllocatorDeleter
 

Typedefs

template<typename T , typename Alloc >
using AllocRebind = typename std::allocator_traits< Alloc >::template rebind_traits< T >
 
template<typename Alloc , typename T >
using Deleter = typename std::conditional< std::is_same< typename std::allocator_traits< Alloc >::template rebind_alloc< T >, typename std::allocator< void >::template rebind< T >::other >::value, std::default_delete< T >, AllocatorDeleter< Alloc > >::type
 

Functions

template<typename Alloc >
void * retyped_allocate (size_t size, void *untyped_allocator)
 
template<typename T , typename Alloc >
void retyped_deallocate (void *untyped_pointer, void *untyped_allocator)
 
template<typename T , typename Alloc >
void * retyped_reallocate (void *untyped_pointer, size_t size, void *untyped_allocator)
 
template<typename T , typename Alloc , typename std::enable_if<!std::is_same< Alloc, std::allocator< void >>::value >::type * = nullptr>
rcl_allocator_t get_rcl_allocator (Alloc &allocator)
 
template<typename Alloc , typename T , typename D >
void set_allocator_for_deleter (D *deleter, Alloc *alloc)
 
template<typename T , typename U >
void set_allocator_for_deleter (std::default_delete< T > *deleter, std::allocator< U > *alloc)
 
template<typename Alloc , typename T >
void set_allocator_for_deleter (AllocatorDeleter< T > *deleter, Alloc *alloc)
 

Typedef Documentation

◆ AllocRebind

template<typename T , typename Alloc >
using rclcpp::allocator::AllocRebind = typedef typename std::allocator_traits<Alloc>::template rebind_traits<T>

◆ Deleter

template<typename Alloc , typename T >
using rclcpp::allocator::Deleter = typedef typename std::conditional< std::is_same<typename std::allocator_traits<Alloc>::template rebind_alloc<T>, typename std::allocator<void>::template rebind<T>::other>::value, std::default_delete<T>, AllocatorDeleter<Alloc> >::type

Function Documentation

◆ retyped_allocate()

template<typename Alloc >
void* rclcpp::allocator::retyped_allocate ( size_t  size,
void *  untyped_allocator 
)

◆ retyped_deallocate()

template<typename T , typename Alloc >
void rclcpp::allocator::retyped_deallocate ( void *  untyped_pointer,
void *  untyped_allocator 
)

◆ retyped_reallocate()

template<typename T , typename Alloc >
void* rclcpp::allocator::retyped_reallocate ( void *  untyped_pointer,
size_t  size,
void *  untyped_allocator 
)

◆ get_rcl_allocator()

template<typename T , typename Alloc , typename std::enable_if<!std::is_same< Alloc, std::allocator< void >>::value >::type * = nullptr>
rcl_allocator_t rclcpp::allocator::get_rcl_allocator ( Alloc &  allocator)

◆ set_allocator_for_deleter() [1/3]

template<typename Alloc , typename T , typename D >
void rclcpp::allocator::set_allocator_for_deleter ( D *  deleter,
Alloc *  alloc 
)

◆ set_allocator_for_deleter() [2/3]

template<typename T , typename U >
void rclcpp::allocator::set_allocator_for_deleter ( std::default_delete< T > *  deleter,
std::allocator< U > *  alloc 
)

◆ set_allocator_for_deleter() [3/3]

template<typename Alloc , typename T >
void rclcpp::allocator::set_allocator_for_deleter ( AllocatorDeleter< T > *  deleter,
Alloc *  alloc 
)