CARLA
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
carla::client::detail::CallbackList< InputsT > Class Template Reference

#include <CallbackList.h>

+ Inheritance diagram for carla::client::detail::CallbackList< InputsT >:
+ Collaboration diagram for carla::client::detail::CallbackList< InputsT >:

Classes

struct  Item
 

Public Types

using CallbackType = std::function< void(InputsT...)>
 

Public Member Functions

void Call (InputsT... args) const
 
void Clear ()
 
size_t Push (CallbackType &&callback)
 
void Remove (size_t id)
 

Private Attributes

std::atomic_size_t _counter {0u}
 
AtomicList< Item_list
 

Additional Inherited Members

- Private Member Functions inherited from carla::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=delete
 

Detailed Description

template<typename... InputsT>
class carla::client::detail::CallbackList< InputsT >

Definition at line 20 of file CallbackList.h.

Member Typedef Documentation

◆ CallbackType

template<typename... InputsT>
using carla::client::detail::CallbackList< InputsT >::CallbackType = std::function<void(InputsT...)>

Definition at line 23 of file CallbackList.h.

Member Function Documentation

◆ Call()

template<typename... InputsT>
void carla::client::detail::CallbackList< InputsT >::Call ( InputsT...  args) const
inline

Definition at line 25 of file CallbackList.h.

◆ Clear()

template<typename... InputsT>
void carla::client::detail::CallbackList< InputsT >::Clear ( void  )
inline

Definition at line 43 of file CallbackList.h.

◆ Push()

template<typename... InputsT>
size_t carla::client::detail::CallbackList< InputsT >::Push ( CallbackType &&  callback)
inline

Definition at line 32 of file CallbackList.h.

◆ Remove()

template<typename... InputsT>
void carla::client::detail::CallbackList< InputsT >::Remove ( size_t  id)
inline

Definition at line 39 of file CallbackList.h.

Member Data Documentation

◆ _counter

template<typename... InputsT>
std::atomic_size_t carla::client::detail::CallbackList< InputsT >::_counter {0u}
private

◆ _list

template<typename... InputsT>
AtomicList<Item> carla::client::detail::CallbackList< InputsT >::_list
private

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